Skip to content

Commit

Permalink
fix: 버그 수정6
Browse files Browse the repository at this point in the history
  • Loading branch information
abcxj123 committed Jun 11, 2024
1 parent 906e405 commit 0e9fbdb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/pages/MyHome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export const MyHome = () => {
</div>
</div>

<div>
{/* <div>
<img src='/images/kakao.svg' className='w-20' />
<div className='font-hanaBold text-white text-lg drop-shadow-[0px_0px_1px_rgba(0,0,0,1)] text-center -m-2'>
카톡공유
Expand All @@ -62,7 +62,7 @@ export const MyHome = () => {
<div className='font-hanaBold text-white text-lg drop-shadow-[0px_0px_1px_rgba(0,0,0,1)] text-center -m-2'>
링크공유
</div>
</div>
</div> */}

<div onClick={() => navigate('/myhome/capture')}>
<img src='/images/capture.svg' className='w-20' />
Expand Down
15 changes: 6 additions & 9 deletions src/utils/dateTimeformat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,16 @@ export function formatter(date: Date): string {
}

export function formatter2(date: Date) {
const newDate = toLocale(date);
const monthDate =
(newDate.getMonth() + 1 < 9
? '0' + (newDate.getMonth() + 1)
: newDate.getMonth() + 1) +
(date.getMonth() + 1 < 9
? '0' + (date.getMonth() + 1)
: date.getMonth() + 1) +
'. ' +
(newDate.getDate() < 9 ? '0' + newDate.getDate() : newDate.getDate());
(date.getDate() < 9 ? '0' + date.getDate() : date.getDate());
const time =
(newDate.getHours() < 9 ? '0' + newDate.getHours() : newDate.getHours()) +
(date.getHours() < 9 ? '0' + date.getHours() : date.getHours()) +
':' +
(newDate.getMinutes() < 9
? '0' + newDate.getMinutes()
: newDate.getMinutes());
(date.getMinutes() < 9 ? '0' + date.getMinutes() : date.getMinutes());
return { monthDate, time };
}

Expand Down

0 comments on commit 0e9fbdb

Please sign in to comment.