Skip to content

Commit

Permalink
Added missing about component to post submission page
Browse files Browse the repository at this point in the history
  • Loading branch information
mbeps committed Feb 20, 2023
1 parent 4797d1f commit 1583151
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/pages/community/[communityId]/submit.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
import { communityState } from "@/atoms/communitiesAtom";
import About from "@/components/Community/About";
import PageContent from "@/components/Layout/PageContent";
import NewPostForm from "@/components/Posts/NewPostForm";
import { auth } from "@/firebase/clientApp";
import useCommunityData from "@/hooks/useCommunityData";
import { Box, Text } from "@chakra-ui/react";
import React from "react";
import { useAuthState } from "react-firebase-hooks/auth";
import { useRecoilValue } from "recoil";

const SubmitPostPage: React.FC = () => {
const [user] = useAuthState(auth);
const communityStateValue = useRecoilValue(communityState);
// const communityStateValue = useRecoilValue(communityState);
const { communityStateValue } = useCommunityData();
console.log(communityStateValue);
return (
<PageContent>
Expand All @@ -21,7 +24,11 @@ const SubmitPostPage: React.FC = () => {
</Box>
{user && <NewPostForm user={user} />}
</>
<>{/* About */}</>
<>
{communityStateValue.currentCommunity && (
<About communityData={communityStateValue.currentCommunity} />
)}
</>
</PageContent>
);
};
Expand Down

0 comments on commit 1583151

Please sign in to comment.