Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import { HomeFeedType } from "@hey/data/enums";
2import NewPost from "@/components/Composer/NewPost";
3import ExploreFeed from "@/components/Explore/ExploreFeed";
4import PageLayout from "@/components/Shared/PageLayout";
5import { useAccountStore } from "@/store/persisted/useAccountStore";
6import { useHomeTabStore } from "@/store/persisted/useHomeTabStore";
7import FeedType from "./FeedType";
8import ForYou from "./ForYou";
9import Hero from "./Hero";
10import Highlights from "./Highlights";
11import Timeline from "./Timeline";
12
13const Home = () => {
14 const { currentAccount } = useAccountStore();
15 const { feedType } = useHomeTabStore();
16 const loggedInWithAccount = Boolean(currentAccount);
17
18 return (
19 <PageLayout>
20 {loggedInWithAccount ? (
21 <>
22 <FeedType />
23 <NewPost />
24 {feedType === HomeFeedType.FOLLOWING ? (
25 <Timeline />
26 ) : feedType === HomeFeedType.HIGHLIGHTS ? (
27 <Highlights />
28 ) : feedType === HomeFeedType.FORYOU ? (
29 <ForYou />
30 ) : null}
31 </>
32 ) : (
33 <>
34 <Hero />
35 <ExploreFeed />
36 </>
37 )}
38 </PageLayout>
39 );
40};
41
42export default Home;