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 (
+ );
+}
diff --git a/src/pages/SlidePage.tsx b/src/pages/SlidePage.tsx
index 7e3229fb..0a74aa83 100644
--- a/src/pages/SlidePage.tsx
+++ b/src/pages/SlidePage.tsx
@@ -1,7 +1,23 @@
+import { useEffect } from 'react';
+import { useParams } from 'react-router-dom';
+
+import { setLastSlideId } from '@/constants/navigation';
+
export default function SlidePage() {
+ const { projectId, slideId } = useParams<{
+ projectId: string;
+ slideId: string;
+ }>();
+
+ useEffect(() => {
+ if (projectId && slideId) {
+ setLastSlideId(projectId, slideId);
+ }
+ }, [projectId, slideId]);
+
return (
-
슬라이드
+ 슬라이드 {slideId}
);
}
diff --git a/src/pages/index.ts b/src/pages/index.ts
new file mode 100644
index 00000000..7f371d74
--- /dev/null
+++ b/src/pages/index.ts
@@ -0,0 +1,4 @@
+export { default as HomePage } from './HomePage';
+export { default as InsightPage } from './InsightPage';
+export { default as SlidePage } from './SlidePage';
+export { default as VideoPage } from './VideoPage';
diff --git a/tsconfig.app.json b/tsconfig.app.json
index c8fd2896..595827e4 100644
--- a/tsconfig.app.json
+++ b/tsconfig.app.json
@@ -21,7 +21,13 @@
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
- "noUncheckedSideEffectImports": true
+ "noUncheckedSideEffectImports": true,
+
+ /* Paths */
+ "baseUrl": ".",
+ "paths": {
+ "@/*": ["./src/*"]
+ }
},
"include": ["src"]
}
diff --git a/vite.config.ts b/vite.config.ts
index aa4c0c5c..d07dd82a 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,9 +1,14 @@
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react-swc';
-
+import path from 'path';
import { defineConfig } from 'vite';
// https://vite.dev/config/
export default defineConfig({
plugins: [react(), tailwindcss()],
+ resolve: {
+ alias: {
+ '@': path.resolve(__dirname, './src'),
+ },
+ },
});