From 328b1816a7a46452f26363178a0974b052d44376 Mon Sep 17 00:00:00 2001 From: jjh4450 Date: Mon, 16 Sep 2024 09:57:57 +0900 Subject: [PATCH] =?UTF-8?q?style(route):=20camelCase=EB=A1=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.tsx | 4 ++-- src/components/Header/index.tsx | 10 +++++----- src/shared/routing/{RouterInfo.tsx => routerInfo.tsx} | 6 +++--- src/shared/types/{Route.ts => routing.ts} | 2 +- 4 files changed, 11 insertions(+), 11 deletions(-) rename src/shared/routing/{RouterInfo.tsx => routerInfo.tsx} (93%) rename src/shared/types/{Route.ts => routing.ts} (80%) diff --git a/src/App.tsx b/src/App.tsx index 2802648..e137b93 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,8 +1,8 @@ import { createBrowserRouter, RouterProvider } from "react-router-dom"; import Layout from "./components/Layout"; -import RouterInfo from "./shared/routing/RouterInfo.tsx"; +import routerInfo from "./shared/routing/routerInfo.tsx"; -const RouterPath = RouterInfo.map((info) => { +const RouterPath = routerInfo.map((info) => { return { path: info.path, element: info.element, diff --git a/src/components/Header/index.tsx b/src/components/Header/index.tsx index e36e286..f01a325 100644 --- a/src/components/Header/index.tsx +++ b/src/components/Header/index.tsx @@ -1,6 +1,6 @@ import React, { useCallback, useEffect, useRef, useState } from "react"; import { Link, matchPath, useLocation } from "react-router-dom"; -import RouterInfo from "../../shared/routing/RouterInfo"; +import routerInfo from "../../shared/routing/routerInfo.tsx"; import Logo from "../../assets/logo.svg?react"; import Menu from "../../assets/menu_buton.json"; import { @@ -14,7 +14,7 @@ import { menuStyles, toggleBtnStyles, } from "./.css.ts"; -import { RouterInfoType } from "../../shared/types/Route"; +import { routerInfoType } from "../../shared/types/routing.ts"; import Lottie, { LottieRefCurrentProps } from "lottie-react"; /** @@ -62,7 +62,7 @@ export const Header: React.FC = () => { * 컴포넌트가 마운트될 때 현재 페이지를 설정하고, isActive를 false로 초기화함 */ useEffect(() => { - const currentRoute = RouterInfo.find((route) => isCurrentPath(route.path, location.pathname)); + const currentRoute = routerInfo.find((route) => isCurrentPath(route.path, location.pathname)); setCurrentPage(currentRoute?.korean ?? "/"); setIsActive(false); lottieRef.current?.setSpeed(1.5); @@ -91,8 +91,8 @@ export const Header: React.FC = () => { {/*페이지 메뉴*/}