Skip to content

Commit cdfb3f2

Browse files
committed
style default home page and cleanup
1 parent c058c59 commit cdfb3f2

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/views/Home.jsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
import './Home.css';
22
import { SingleList, ShareListComponent } from '../components';
3-
import { createList, useAuth, deleteList, unfollowList } from '../api';
3+
import {
4+
createList,
5+
useAuth,
6+
deleteList,
7+
unfollowList,
8+
SignInButton,
9+
} from '../api';
410
import { Fragment, useState, useEffect } from 'react';
511
import { useNavigate } from 'react-router-dom';
612
import { useVoiceToText } from '../utils';
@@ -16,12 +22,6 @@ export function Home({ data, setListPath, setAllLists }) {
1622
const userEmail = user?.email;
1723
const navigate = useNavigate();
1824
const { text, isListening, startListening } = useVoiceToText();
19-
// const messageSignIn = {
20-
// header: 'Warning:',
21-
// promptMSG: 'You are not logged in. Please sign into your account',
22-
// btnText: 'Go Back',
23-
// route: '/',
24-
// };
2525

2626
useEffect(() => {
2727
if (text) {
@@ -82,7 +82,6 @@ export function Home({ data, setListPath, setAllLists }) {
8282
console.log(error);
8383
}
8484
};
85-
// style={{background:'#676D16'}
8685
return (
8786
<>
8887
{data.length ? (
@@ -97,7 +96,6 @@ export function Home({ data, setListPath, setAllLists }) {
9796
className="flex items-center justify-between p-4 rounded-3xl shadow-md border border-primary"
9897
style={{ background: '#f8fdef' }}
9998
>
100-
{/* style={{background:'black'}} */}
10199
<SingleList
102100
name={list.name}
103101
setListPath={setListPath}
@@ -164,7 +162,10 @@ export function Home({ data, setListPath, setAllLists }) {
164162
</form>
165163
</div>
166164
) : (
167-
<h2 className="text-center my-8">You have no lists to display</h2>
165+
<div className="flex flex-col h-[80vh] my-8 p-8 rounded-3xl shadow-xl overflow-hidden mx-auto bg-neutral place-content-center items-center">
166+
<h1 className="text-center my-8 text-accent">Welcome to SnapShop!</h1>
167+
<SignInButton />
168+
</div>
168169
)}
169170
</>
170171
);

src/views/List.jsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,6 @@ export function List({ data, userId, path }) {
122122
<ListItem item={item} key={crypto.randomUUID()} />
123123
))}
124124
</div>
125-
// <Fragment >
126-
127-
// </Fragment>
128125
))}
129126
</ul>
130127
</div>

0 commit comments

Comments
 (0)