diff --git a/src/App.css b/src/App.css deleted file mode 100644 index e69de29b..00000000 diff --git a/src/App.tsx b/src/App.tsx deleted file mode 100644 index b09fa42b..00000000 --- a/src/App.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import { Outlet, useLocation } from 'react-router-dom'; - -import './App.css'; -import { Gnb, Layout } from './components/layout'; -import { DEFAULT_TAB, PATH_TO_TAB } from './constants/navigation'; - -function App() { - const location = useLocation(); - const activeTab = PATH_TO_TAB[location.pathname] ?? DEFAULT_TAB; - - return ( - 로고} - headerCenter={} - headerRight={
로그인
} - > - -
- ); -} - -export default App; diff --git a/src/assets/logo-full.svg b/src/assets/logo-full.svg new file mode 100644 index 00000000..b1cd86c8 --- /dev/null +++ b/src/assets/logo-full.svg @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/assets/logo-full@4x.webp b/src/assets/logo-full@4x.webp new file mode 100644 index 00000000..9b9dfd64 Binary files /dev/null and b/src/assets/logo-full@4x.webp differ diff --git a/src/assets/logo-icon.svg b/src/assets/logo-icon.svg new file mode 100644 index 00000000..2da245ed --- /dev/null +++ b/src/assets/logo-icon.svg @@ -0,0 +1,4 @@ + + + + diff --git a/src/assets/logo-icon@4x.webp b/src/assets/logo-icon@4x.webp new file mode 100644 index 00000000..1a3c03fb Binary files /dev/null and b/src/assets/logo-icon@4x.webp differ diff --git a/src/components/common/LoginButton.tsx b/src/components/common/LoginButton.tsx new file mode 100644 index 00000000..87b08fe6 --- /dev/null +++ b/src/components/common/LoginButton.tsx @@ -0,0 +1,9 @@ +import { Link } from 'react-router-dom'; + +export function LoginButton() { + return ( + + 로그인 + + ); +} diff --git a/src/components/common/Logo.tsx b/src/components/common/Logo.tsx new file mode 100644 index 00000000..973b0b72 --- /dev/null +++ b/src/components/common/Logo.tsx @@ -0,0 +1,15 @@ +import { Link, useLocation } from 'react-router-dom'; + +import logoFull from '@/assets/logo-full@4x.webp'; +import logoIcon from '@/assets/logo-icon@4x.webp'; + +export function Logo() { + const { pathname } = useLocation(); + const isHome = pathname === '/'; + + return ( + + 또랑 + + ); +} diff --git a/src/components/common/index.ts b/src/components/common/index.ts new file mode 100644 index 00000000..85767d1a --- /dev/null +++ b/src/components/common/index.ts @@ -0,0 +1,2 @@ +export { LoginButton } from './LoginButton'; +export { Logo } from './Logo'; diff --git a/src/components/layout/Gnb.tsx b/src/components/layout/Gnb.tsx index 2db7fff9..6d99e8fd 100644 --- a/src/components/layout/Gnb.tsx +++ b/src/components/layout/Gnb.tsx @@ -1,26 +1,28 @@ -import { Link } from 'react-router-dom'; +import { Link, useLocation, useParams } from 'react-router-dom'; import clsx from 'clsx'; -import { DEFAULT_TAB, TABS, type Tab } from '../../constants/navigation'; +import { TABS, getTabFromPathname, getTabPath } from '@/constants/navigation'; -interface GnbProps { - activeTab?: Tab; -} +export function Gnb() { + const { projectId } = useParams<{ projectId: string }>(); + const location = useLocation(); + const activeTab = getTabFromPathname(location.pathname); + + if (!projectId) return null; -export function Gnb({ activeTab = DEFAULT_TAB }: GnbProps) { return (