Skip to content

Commit

Permalink
refactor: Modal의 description 변경 (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
SunwooJaeho authored Oct 25, 2024
1 parent cba8308 commit 5095934
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/components/common/Modal/RandomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { formatDate } from '@utils/date';

const RandomModal = () => {
const [count, setCount] = useState(10000);
const [description, setDescription] = useState(formatDate(new Date()));
const [description, setDescription] = useState(
formatDate(new Date()) + ', Random auto generate',
);
const setModal = useSetSelectedModalStore();
const setResult = useSetResultStore();
const defaultCase = useGetCaseStore();
Expand Down
4 changes: 3 additions & 1 deletion src/components/common/Modal/SelectedRandomModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ import { formatDate } from '@utils/date';

const SelectedRandomModal = () => {
const [count, setCount] = useState(10000);
const [description, setDescription] = useState(formatDate(new Date()));
const [description, setDescription] = useState(
formatDate(new Date()) + ', Selected auto generate',
);
const setModal = useSetSelectedModalStore();
const selectedCase = useGetSelectedCaseStore();
const setResult = useSetResultStore();
Expand Down
2 changes: 1 addition & 1 deletion src/utils/date.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { format } from 'date-fns';

export function formatDate(date: Date) {
return format(date, 'yyyy-MM-dd');
return format(date, 'yyyy-MM-dd HH:mm');
}

0 comments on commit 5095934

Please sign in to comment.