-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
89f0811
commit 5c0009d
Showing
3 changed files
with
20 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
import React, { useContext } from 'react'; | ||
import CreatePost from './CreatePost'; | ||
import Feed from './feed'; | ||
import { UserContext } from '../contexts/user'; | ||
import React, { useContext } from "react"; | ||
import CreatePost from "./CreatePost"; | ||
import Feed from "./feed"; | ||
import { UserContext } from "../contexts/user"; | ||
|
||
const homeStyle = { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
alignItems: 'center', | ||
backgroundColor: '#101010 ' | ||
} | ||
display: "flex", | ||
flexDirection: "column", | ||
alignItems: "center", | ||
backgroundColor: "#101010", | ||
}; | ||
|
||
export default function Home() { | ||
const [user] = useContext(UserContext).user; | ||
return ( | ||
<div style={homeStyle}> | ||
<CreatePost /> | ||
{/* if user is signed in, display feed */} | ||
{user && <Feed />} | ||
</div> | ||
); | ||
const [user] = useContext(UserContext).user; | ||
return ( | ||
<div style={homeStyle}> | ||
<CreatePost /> | ||
{/* if user is signed in, display feed */} | ||
{user && <Feed />} | ||
</div> | ||
); | ||
} |