Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ Feat: 게시물 종료 버튼 추가 #354

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading