Skip to content

Commit

Permalink
Replaced router with communityData
Browse files Browse the repository at this point in the history
- When clicking on create post from about component
  • Loading branch information
mbeps committed Feb 18, 2023
1 parent 70fac5e commit 79f3a8c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/components/Community/About.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ type AboutProps = {
};

const About: React.FC<AboutProps> = ({ communityData }) => {
const router = useRouter();
const [user] = useAuthState(auth);
const selectFileRef = useRef<HTMLInputElement>(null);
const { selectedFile, setSelectedFile, onSelectFile } = useSelectFile();
Expand Down Expand Up @@ -95,7 +94,7 @@ const About: React.FC<AboutProps> = ({ communityData }) => {
</Flex>
</Flex>
{/* create post button */}
<Link href={`/community/${router.query.communityId}/submit`}>
<Link href={`/community/${communityData.id}/submit`}>
<Button width="100%">Create Post</Button>
</Link>

Expand Down

0 comments on commit 79f3a8c

Please sign in to comment.