Skip to content

Commit

Permalink
✨ Feat: 게시물 종료 버튼 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
geumbin committed Jul 29, 2024
1 parent 4d4f485 commit fe1eb0b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/notice/FakeNotice/FakeNoticeShowHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import { MdOutlineClose } from 'react-icons/md';
import { useNavigate } from 'react-router-dom';

import * as S from '@/styles/notice/noticeShow.style';

interface NoticeShowHeaderProps {
Expand All @@ -8,10 +11,21 @@ interface NoticeShowHeaderProps {

export const FakeNoticeShowHeader = ({ title, date, view }: NoticeShowHeaderProps) => {
const NoticeWriter = '관리자';
const navigate = useNavigate();
const handleNoticeClose = () => {
navigate('/');
};

return (
<>
<S.NoticeShowHeaderStyle>
<button onClick={handleNoticeClose}>
<MdOutlineClose
style={{ position: 'absolute', top: '20px', right: '10vw' }}
size={34}
color="rgba(0, 0, 0, 0.2)"
/>
</button>
<p style={{ fontSize: '40px', fontWeight: '800', color: '#25213B', margin: '20px' }}>공지사항</p>
{/* 게시물 제목 */}
<S.NoticeShowTitle>{title}</S.NoticeShowTitle>
Expand Down

0 comments on commit fe1eb0b

Please sign in to comment.