Skip to content

Commit

Permalink
Feat: 게시글 작성 버튼누르면 게시글 작성 페이지로 라우팅
Browse files Browse the repository at this point in the history
  • Loading branch information
soulchicken committed Oct 23, 2023
1 parent 891c3c2 commit 116f42a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/community/PostHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const PostHeader = () => {
characterInfo
? (
<CharacterInfo
profileImageUrl="/leeyj.png"
profileImageUrl={characterInfo.profileImageUrl}
characterName={`${characterInfo.characterName} 게시판`}
hashTag={characterInfo.hashTag}
link={`/community/${characterInfo.characterId}`}
Expand Down
8 changes: 7 additions & 1 deletion src/components/community/WriteButton.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
import color from '@/styles/color';
import PostWriteIcon from '@/components/icons/PostWriteIcon';
import { css } from '@emotion/react';
import { useRouter } from 'next/router';

const WriteButton = () => {
const router = useRouter();
const { character_id: characterId } = router.query;

const buttonHandler = () => {
console.log(1);
if (characterId && typeof characterId === 'string') {
router.push(`/community/${characterId}/edit`);
}
};

return (
Expand Down

0 comments on commit 116f42a

Please sign in to comment.