Skip to content

Commit

Permalink
feat :: 공지사항 고정
Browse files Browse the repository at this point in the history
  • Loading branch information
dutexion committed Jul 10, 2024
1 parent f12072e commit f2af3d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/components/Board/BoardElement.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -25,6 +26,7 @@ const BoardElement = (props: IBoard) => {
userName,
faq_type,
createdAt,
isPinned,
} = props;
const [clicked, setClicked] = useState(false);
const { isAdmin, authorityColor } = useAuthority();
Expand All @@ -49,8 +51,14 @@ const BoardElement = (props: IBoard) => {
whiteSpace="nowrap"
style={{ overflow: searchParams.get('type') != 'faq' && 'hidden' }}
width={400}
display="flex"
>
{title}
{isPinned && (
<Div style={{ marginLeft: '4px' }}>
<Pin size={14} color={theme.color.orange500} />
</Div>
)}
</Text>
</Div>
</Pc>
Expand Down
1 change: 1 addition & 0 deletions src/interfaces/Board.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ export interface IBoard {
content?: string;
faq_type?: FaqType;
boardId?: string;
isPinned?: boolean;
}
1 change: 1 addition & 0 deletions src/pages/Notice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ const NoticePage = () => {
isWriteDay={true}
isWriter={false}
isPublic
isPinned={notice.isPinned}
/>
</Link>
);
Expand Down

0 comments on commit f2af3d1

Please sign in to comment.