From f2af3d16380abe68a314e4f83e5f37114128d525 Mon Sep 17 00:00:00 2001 From: dutexion Date: Wed, 10 Jul 2024 19:15:41 +0900 Subject: [PATCH] =?UTF-8?q?feat=20::=20=EA=B3=B5=EC=A7=80=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Board/BoardElement.tsx | 8 ++++++++ src/interfaces/Board.d.ts | 1 + src/pages/Notice.tsx | 1 + 3 files changed, 10 insertions(+) diff --git a/src/components/Board/BoardElement.tsx b/src/components/Board/BoardElement.tsx index 31ffa49..88c92ef 100644 --- a/src/components/Board/BoardElement.tsx +++ b/src/components/Board/BoardElement.tsx @@ -8,6 +8,7 @@ import { useAuthority } from '@/hooks/useAuthority'; import { useNavigate, useSearchParams } from 'react-router-dom'; import { faqTypeToKorean } from '@/utils/translate'; import { DeleteFaq } from '@/utils/api/faq'; +import Pin from '@/assets/pin'; const BoardElement = (props: IBoard) => { const { @@ -25,6 +26,7 @@ const BoardElement = (props: IBoard) => { userName, faq_type, createdAt, + isPinned, } = props; const [clicked, setClicked] = useState(false); const { isAdmin, authorityColor } = useAuthority(); @@ -49,8 +51,14 @@ const BoardElement = (props: IBoard) => { whiteSpace="nowrap" style={{ overflow: searchParams.get('type') != 'faq' && 'hidden' }} width={400} + display="flex" > {title} + {isPinned && ( +
+ +
+ )} diff --git a/src/interfaces/Board.d.ts b/src/interfaces/Board.d.ts index 31c479d..933688c 100644 --- a/src/interfaces/Board.d.ts +++ b/src/interfaces/Board.d.ts @@ -16,4 +16,5 @@ export interface IBoard { content?: string; faq_type?: FaqType; boardId?: string; + isPinned?: boolean; } diff --git a/src/pages/Notice.tsx b/src/pages/Notice.tsx index 01c7e37..37ffa07 100644 --- a/src/pages/Notice.tsx +++ b/src/pages/Notice.tsx @@ -50,6 +50,7 @@ const NoticePage = () => { isWriteDay={true} isWriter={false} isPublic + isPinned={notice.isPinned} /> );