From 33ef1a3b9e658c6488088a5af93bec1a01c31bf5 Mon Sep 17 00:00:00 2001 From: YooJin Lee <113789141+youznn@users.noreply.github.com> Date: Sat, 9 Nov 2024 15:42:03 +0900 Subject: [PATCH] refactor(fe): refactor public directory (#2188) * refactor(re): refactor public folde * Optimised images with calibre/image-actions * fix(fe): fix directory * fix(fe): fix file name --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .../(main)/_components/ContestCard.tsx | 4 +- .../(client)/(main)/_components/Footer.tsx | 4 +- .../(client)/(main)/_components/Header.tsx | 4 +- .../(main)/_components/StatusBadge.tsx | 16 +++--- .../@tabs/problem/_components/Columns.tsx | 4 +- .../(main)/contest/[contestId]/layout.tsx | 8 +-- .../_components/FinishedTableColumns.tsx | 4 +- apps/frontend/app/(client)/(main)/page.tsx | 6 +-- .../settings/_components/CurrentPwSection.tsx | 6 +-- .../settings/_components/LogoSection.tsx | 2 +- .../settings/_components/NewPwSection.tsx | 6 +-- .../_components/ReEnterNewPwSection.tsx | 6 +-- .../contest/[contestId]/(overall)/layout.tsx | 4 +- .../_components/ContestTableColumns.tsx | 8 +-- apps/frontend/app/admin/layout.tsx | 4 +- apps/frontend/app/admin/page.tsx | 2 +- .../problem/_components/ContainedContests.tsx | 4 +- .../components/ContestStatusTimeDiff.tsx | 2 +- apps/frontend/components/Cover.tsx | 6 +-- .../frontend/components/EditorDescription.tsx | 16 +++--- apps/frontend/components/EditorHeader.tsx | 2 +- apps/frontend/components/EditorLayout.tsx | 2 +- apps/frontend/components/ErrorDetail.tsx | 4 +- .../components/auth/RecoverAccount.tsx | 4 +- apps/frontend/components/auth/SignIn.tsx | 4 +- apps/frontend/components/auth/SignUp.tsx | 4 +- .../components/auth/SignUpRegister.tsx | 2 +- .../components/auth/UpdateInformation.tsx | 4 +- apps/frontend/public/20_upcoming.svg | 4 -- .../{bug-carousel.png => banners/bug.png} | Bin .../{ => banners}/codedang-carousel.png | Bin .../codedang.png} | Bin .../{contest-icon.png => banners/contest.png} | Bin .../github.png} | Bin .../{notice-icon.png => banners/notice.png} | Bin apps/frontend/public/contestbanner.svg | 51 ------------------ apps/frontend/public/dummy.png | Bin 97057 -> 0 bytes apps/frontend/public/finished.svg | 3 -- apps/frontend/public/github.svg | 1 - .../{20_calendar.svg => icons/calendar.svg} | 0 .../{check_blue.svg => icons/check-blue.svg} | 0 .../check-gray.svg} | 0 .../public/{ => icons}/check-green.svg | 0 .../{check.svg => icons/check-white.svg} | 0 .../public/{20_clock.svg => icons/clock.svg} | 0 .../compile-version.svg} | 0 .../{24_copy.svg => icons/copy-blue.svg} | 0 .../copy-complete.svg} | 0 apps/frontend/public/{ => icons}/copy.svg | 0 .../{24_compile.svg => icons/file-info.svg} | 0 .../{20_finished.svg => icons/finished.svg} | 0 .../{24_invisible.svg => icons/invisible.svg} | 0 .../{20_ongoing.svg => icons/ongoing.svg} | 0 apps/frontend/public/{ => icons}/period.svg | 0 apps/frontend/public/{ => icons}/submit.svg | 0 apps/frontend/public/{ => icons}/upcoming.svg | 0 .../{24_visible.svg => icons/visible.svg} | 0 apps/frontend/public/kakaotalk.svg | 1 - .../public/{ => logos}/codedang-editor.svg | 0 .../codedang-with-text.svg} | 0 apps/frontend/public/{ => logos}/error.webp | Bin apps/frontend/public/logos/welcome.png | Bin 0 -> 85518 bytes apps/frontend/public/noticebanner.svg | 23 -------- apps/frontend/public/ongoing.svg | 3 -- apps/frontend/public/problembanner.svg | 18 ------- apps/frontend/public/settings.png | Bin 834 -> 0 bytes apps/frontend/public/skkudingLogo.png | Bin 27397 -> 0 bytes apps/frontend/public/welcome.svg | 9 ---- 68 files changed, 73 insertions(+), 182 deletions(-) delete mode 100644 apps/frontend/public/20_upcoming.svg rename apps/frontend/public/{bug-carousel.png => banners/bug.png} (100%) rename apps/frontend/public/{ => banners}/codedang-carousel.png (100%) rename apps/frontend/public/{codedang-icon.png => banners/codedang.png} (100%) rename apps/frontend/public/{contest-icon.png => banners/contest.png} (100%) rename apps/frontend/public/{github-carousel.png => banners/github.png} (100%) rename apps/frontend/public/{notice-icon.png => banners/notice.png} (100%) delete mode 100644 apps/frontend/public/contestbanner.svg delete mode 100644 apps/frontend/public/dummy.png delete mode 100644 apps/frontend/public/finished.svg delete mode 100644 apps/frontend/public/github.svg rename apps/frontend/public/{20_calendar.svg => icons/calendar.svg} (100%) rename apps/frontend/public/{check_blue.svg => icons/check-blue.svg} (100%) rename apps/frontend/public/{check-gray-icon.svg => icons/check-gray.svg} (100%) rename apps/frontend/public/{ => icons}/check-green.svg (100%) rename apps/frontend/public/{check.svg => icons/check-white.svg} (100%) rename apps/frontend/public/{20_clock.svg => icons/clock.svg} (100%) rename apps/frontend/public/{compileVersion.svg => icons/compile-version.svg} (100%) rename apps/frontend/public/{24_copy.svg => icons/copy-blue.svg} (100%) rename apps/frontend/public/{copyComplete.svg => icons/copy-complete.svg} (100%) rename apps/frontend/public/{ => icons}/copy.svg (100%) rename apps/frontend/public/{24_compile.svg => icons/file-info.svg} (100%) rename apps/frontend/public/{20_finished.svg => icons/finished.svg} (100%) rename apps/frontend/public/{24_invisible.svg => icons/invisible.svg} (100%) rename apps/frontend/public/{20_ongoing.svg => icons/ongoing.svg} (100%) rename apps/frontend/public/{ => icons}/period.svg (100%) rename apps/frontend/public/{ => icons}/submit.svg (100%) rename apps/frontend/public/{ => icons}/upcoming.svg (100%) rename apps/frontend/public/{24_visible.svg => icons/visible.svg} (100%) delete mode 100644 apps/frontend/public/kakaotalk.svg rename apps/frontend/public/{ => logos}/codedang-editor.svg (100%) rename apps/frontend/public/{codedang.svg => logos/codedang-with-text.svg} (100%) rename apps/frontend/public/{ => logos}/error.webp (100%) create mode 100644 apps/frontend/public/logos/welcome.png delete mode 100644 apps/frontend/public/noticebanner.svg delete mode 100644 apps/frontend/public/ongoing.svg delete mode 100644 apps/frontend/public/problembanner.svg delete mode 100644 apps/frontend/public/settings.png delete mode 100644 apps/frontend/public/skkudingLogo.png delete mode 100644 apps/frontend/public/welcome.svg diff --git a/apps/frontend/app/(client)/(main)/_components/ContestCard.tsx b/apps/frontend/app/(client)/(main)/_components/ContestCard.tsx index b6fa300a51..74915bc9ac 100644 --- a/apps/frontend/app/(client)/(main)/_components/ContestCard.tsx +++ b/apps/frontend/app/(client)/(main)/_components/ContestCard.tsx @@ -2,7 +2,7 @@ import ContestStatusTimeDiff from '@/components/ContestStatusTimeDiff' import { cn, dateFormatter } from '@/lib/utils' -import CalendarIcon from '@/public/20_calendar.svg' +import calendarIcon from '@/public/icons/calendar.svg' import type { Contest } from '@/types/type' import Image from 'next/image' import 'react-circular-progressbar/dist/styles.css' @@ -52,7 +52,7 @@ export default function ContestCard({ contest }: Props) {
{startTime} ~ {endTime}
diff --git a/apps/frontend/app/(client)/(main)/_components/Footer.tsx b/apps/frontend/app/(client)/(main)/_components/Footer.tsx index 41425953a4..3cfd6cdbe2 100644 --- a/apps/frontend/app/(client)/(main)/_components/Footer.tsx +++ b/apps/frontend/app/(client)/(main)/_components/Footer.tsx @@ -1,6 +1,6 @@ 'use client' -import CodedangLogo from '@/public/codedang.svg' +import codedangLogo from '@/public/logos/codedang-with-text.svg' import Image from 'next/image' import { AiOutlineLink } from 'react-icons/ai' import { AiFillMail } from 'react-icons/ai' @@ -21,7 +21,7 @@ export default function Footer() { return (