Skip to content

Commit

Permalink
fix: 지원날짜 null로 올 경우 오늘 날짜로 들어가도록 처리 (#172)
Browse files Browse the repository at this point in the history
  • Loading branch information
chae-won-shin authored Nov 30, 2024
1 parent f4f1105 commit 214a27e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/pages/admin/components/docs/ApplyInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ interface IApplyInfo {
}

const ApplyInfo = ({ track, submittedAt }: IApplyInfo) => {
const datePart = submittedAt.split(' ')[0];
const defaultDate = new Date().toLocaleDateString();
const datePart = submittedAt ? submittedAt.split(' ')[0] : defaultDate;
const formattedDate = datePart.replace(/-/g, '. ');

return (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/admin/components/docs/DocsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const DocsTable = ({

const handleCloseModal = () => {
setOpenDetail(null);
window.location.reload();
// window.location.reload();
};

useEffect(() => {
Expand Down

0 comments on commit 214a27e

Please sign in to comment.