Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…into feature/#5/ProjectCard
  • Loading branch information
miloul committed Feb 15, 2024
2 parents 86a0fbc + a26afe2 commit f377873
Show file tree
Hide file tree
Showing 5 changed files with 191 additions and 48 deletions.
189 changes: 165 additions & 24 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-router-dom": "^6.22.0",
"rollup": "^4.10.0",
"styled-components": "^6.1.8",
"zustand": "^4.5.0"
},
Expand Down
31 changes: 9 additions & 22 deletions src/routes/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import { Outlet, createBrowserRouter } from "react-router-dom"

import TestPage from "@/pages/TestPage/TestPage"
import { createBrowserRouter } from "react-router-dom"

import ErrorPage from "@pages/ErrorPage/ErrorPage"
import HomePage from "@pages/HomePage/HomePage"
Expand All @@ -10,15 +8,13 @@ import ProjectDetailPage from "@pages/ProjectDetailPage/ProjectDetailPage"
import ProjectEditPage from "@pages/ProjectEditPage/ProjectEditPage"
import ProjectListPage from "@pages/ProjectListPage/ProjectListPage"
import SignUpPage from "@pages/SignUpPage/SignUpPage"
import TestPage from "@pages/TestPage/TestPage"

import DefaultLayout from "@styles/layouts/DefaultLayout"

export const router = createBrowserRouter([
{
element: (
<>
{/* <Header /> */}
<Outlet />
</>
),
element: <DefaultLayout />,
errorElement: <ErrorPage />,
children: [
{
Expand All @@ -40,25 +36,16 @@ export const router = createBrowserRouter([
},
],
},
{
path: "/login",
element: <LoginPage />,
},
{
path: "/signup",
element: <SignUpPage />,
},
{
path: "/test",
element: <TestPage />,
},
{
path: "/profile/:userId",
element: <ProfilePage />,
},
],
},

{
path: "/profile/:userId",
element: <ProfilePage />,
},
{
path: "/login",
element: <LoginPage />,
Expand Down
14 changes: 14 additions & 0 deletions src/styles/layouts/DefaultLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Outlet } from "react-router"

import Header from "@components/Header/Header"

const DefaultLayout = () => {
return (
<>
<Header />
<Outlet />
</>
)
}

export default DefaultLayout
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
"forceConsistentCasingInFileNames": false,
"baseUrl": ".",
"paths": {
"@/*": ["src/*"],
"@components/*": ["src/components/*"],
"@apis/*": ["src/apis/*"],
"@assets/*": ["src/assets/*"],
Expand All @@ -33,7 +32,8 @@
"@constants/*": ["src/constants/*"],
"@styles/*": ["src/styles/*"],
"@types/*": ["src/types/*"],
"@utils/*": ["src/utils/*"]
"@utils/*": ["src/utils/*"],
"@/*": ["src/*"]
}
},

Expand Down

0 comments on commit f377873

Please sign in to comment.