Skip to content

Commit

Permalink
feat: dayjs locale 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
wonjin-dev committed Jan 15, 2024
1 parent a99cfdf commit 6f8dc6a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"@vanilla-extract/sprinkles": "^1.6.1",
"axios": "^1.6.2",
"clsx": "^2.0.0",
"dayjs": "^1.11.10",
"ko": "link:dayjs/locale/ko",
"next": "14.0.3",
"react": "^18",
"react-dom": "^18",
Expand Down
10 changes: 10 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion src/domain/Write/History/index.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
import dayjs from 'dayjs';

import 'dayjs/locale/ko';

import Icon from '@components/Icon';

import { type WriteHisotry } from '../types';
Expand All @@ -16,7 +20,9 @@ const WriteHistory = ({ data }: WriteHistoryProps) => {
<div className={style.dateLabelWrapper}>
<div className={style.dateLabel}>
<Icon icon={'clock'} width={20} height={20} />
<span className={style.dateLabelText}>{history.date}</span>
<span className={style.dateLabelText}>
{dayjs(history.date).locale('ko').format('YYYY.MM.DD (dd)')}
</span>
</div>
</div>

Expand Down

0 comments on commit 6f8dc6a

Please sign in to comment.