From a1fec433f512099ca049272524739afa6432c486 Mon Sep 17 00:00:00 2001 From: CheeseB <2489ckckck@naver.com> Date: Wed, 3 Apr 2024 01:51:12 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20PNGS=20=EC=83=81=EC=88=98=EB=AA=85?= =?UTF-8?q?=20WEBPS=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/landing/MatchTeam/MatchCards.tsx | 4 ++-- src/components/layout/Banner/index.tsx | 4 ++-- src/constants/images.ts | 2 +- src/pages/404/index.tsx | 4 ++-- src/pages/500/index.tsx | 4 ++-- src/pages/error/index.tsx | 4 ++-- src/utils/gameFormatter.ts | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/landing/MatchTeam/MatchCards.tsx b/src/components/landing/MatchTeam/MatchCards.tsx index 04fd80d8..df4a5350 100644 --- a/src/components/landing/MatchTeam/MatchCards.tsx +++ b/src/components/landing/MatchTeam/MatchCards.tsx @@ -5,7 +5,7 @@ import { Dispatch, useEffect, useState } from 'react'; import classNames from 'classnames/bind'; -import { GAME_NAME_KR_TO_PATH_NAME, GAME_NAME_LIST_EN, PNGS } from '@/constants'; +import { GAME_NAME_KR_TO_PATH_NAME, GAME_NAME_LIST_EN, WEBPS } from '@/constants'; import { GameClassName } from '@/components/landing/MatchTeam/MatchTeam'; import { useDeviceType } from '@/hooks/useDeviceType'; @@ -14,7 +14,7 @@ import styles from './MatchCards.module.scss'; const cx = classNames.bind(styles); -const { lol, bg, ow, mc } = PNGS.match; +const { lol, bg, ow, mc } = WEBPS.match; type MatchCardsProps = { hoveredCard: GameClassName; diff --git a/src/components/layout/Banner/index.tsx b/src/components/layout/Banner/index.tsx index b5c4120a..c43b73bc 100644 --- a/src/components/layout/Banner/index.tsx +++ b/src/components/layout/Banner/index.tsx @@ -2,7 +2,7 @@ import { useRouter } from 'next/router'; import classNames from 'classnames/bind'; -import { GAME_PATH_NAME_TO_GAME_NAME_EN, PNGS } from '@/constants'; +import { GAME_PATH_NAME_TO_GAME_NAME_EN, WEBPS } from '@/constants'; import styles from './Banner.module.scss'; @@ -13,7 +13,7 @@ const Banner = () => { const { game } = router.query; if (!game) return; const gameName = GAME_PATH_NAME_TO_GAME_NAME_EN[game as keyof typeof GAME_PATH_NAME_TO_GAME_NAME_EN]; - const { url } = PNGS.banner[gameName as keyof typeof PNGS.banner]; + const { url } = WEBPS.banner[gameName as keyof typeof WEBPS.banner]; return (
diff --git a/src/constants/images.ts b/src/constants/images.ts index 298f5f5d..941dc328 100644 --- a/src/constants/images.ts +++ b/src/constants/images.ts @@ -1,4 +1,4 @@ -export const PNGS = { +export const WEBPS = { banner: { ['LEAGUE OF LEGENDS']: { url: '/images/banner-LOL.webp' }, ['BATTLEGROUNDS']: { url: '/images/banner-BG.webp' }, diff --git a/src/pages/404/index.tsx b/src/pages/404/index.tsx index 8bfac65e..35951a0d 100644 --- a/src/pages/404/index.tsx +++ b/src/pages/404/index.tsx @@ -2,12 +2,12 @@ import Image from 'next/image'; import classNames from 'classnames/bind'; -import { PNGS } from '@/constants'; +import { WEBPS } from '@/constants'; import styles from './404.module.scss'; const cx = classNames.bind(styles); -const { url, alt } = PNGS.errorPage.error404; +const { url, alt } = WEBPS.errorPage.error404; const Error404 = () => { return ( diff --git a/src/pages/500/index.tsx b/src/pages/500/index.tsx index 2c5a5962..f28ca3fc 100644 --- a/src/pages/500/index.tsx +++ b/src/pages/500/index.tsx @@ -2,12 +2,12 @@ import Image from 'next/image'; import classNames from 'classnames/bind'; -import { PNGS } from '@/constants'; +import { WEBPS } from '@/constants'; import styles from './500.module.scss'; const cx = classNames.bind(styles); -const { url, alt } = PNGS.errorPage.error500; +const { url, alt } = WEBPS.errorPage.error500; const Error404 = () => { return ( diff --git a/src/pages/error/index.tsx b/src/pages/error/index.tsx index a2d17809..8f9f859e 100644 --- a/src/pages/error/index.tsx +++ b/src/pages/error/index.tsx @@ -4,12 +4,12 @@ import Image from 'next/image'; import classNames from 'classnames/bind'; -import { PNGS } from '@/constants'; +import { WEBPS } from '@/constants'; import styles from './error.module.scss'; const cx = classNames.bind(styles); -const { url, alt } = PNGS.errorPage.error; +const { url, alt } = WEBPS.errorPage.error; export type ErrorProps = { statusCode: number | undefined; diff --git a/src/utils/gameFormatter.ts b/src/utils/gameFormatter.ts index a621e137..836019da 100644 --- a/src/utils/gameFormatter.ts +++ b/src/utils/gameFormatter.ts @@ -1,4 +1,4 @@ -import { CATEGORY_TO_GAME, GAME_NAME_EN_TO_KR, PNGS } from '@/constants'; +import { CATEGORY_TO_GAME, GAME_NAME_EN_TO_KR, WEBPS } from '@/constants'; import { GameNameEN, LinkName } from '@/types'; @@ -11,4 +11,4 @@ export const formatCategoryToGameNameEN = (category: string) => CATEGORY_TO_GAME export const formatCategoryToGameNameKR = (category: string) => GAME_NAME_EN_TO_KR[CATEGORY_TO_GAME[category]]; export const formatCategoryToBannerImageURL = (category: string) => - PNGS.banner[formatCategoryToGameNameEN(category)].url; + WEBPS.banner[formatCategoryToGameNameEN(category)].url;