Skip to content

Commit

Permalink
#102 fix: 팀/개인 대시보드 중첩 라우팅 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
MyungJiwoo committed Oct 28, 2024
1 parent 8683710 commit 0bc96d6
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
32 changes: 25 additions & 7 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { useEffect, useState } from 'react';
import { Routes, Route } from 'react-router-dom';
import MainPage from './pages/MainPage';
// import MainPage from './pages/MainPage';
import LoginPage from './pages/LoginPage';
import MyPage from './pages/MyPage';
import CreateBoard from './pages/CreateBoardPage';
Expand Down Expand Up @@ -101,31 +101,49 @@ const App = () => {
<PersonalDashboard />
</ProtectedRoute>
}
/>
<Route
>
<Route
path=":blockId"
element={
<ProtectedRoute>
<SidePage />
</ProtectedRoute>
}
/>
</Route>
{/* <Route
path="/personalBlock/:blockId"
element={
<ProtectedRoute>
<SidePage />
</ProtectedRoute>
}
/>
/> */}
<Route
path="/team/:id"
element={
<ProtectedRoute>
<TeamDashBoard />
</ProtectedRoute>
}
/>
<Route
>
<Route
path=":blockId"
element={
<ProtectedRoute>
<SidePage />
</ProtectedRoute>
}
/>
</Route>
{/* <Route
path="/:id"
element={
<ProtectedRoute>
<MainPage />
</ProtectedRoute>
}
/>
/> */}

<Route
path="/createBoard"
Expand Down
2 changes: 1 addition & 1 deletion src/components/Block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Block = ({
const navigate = useNavigate();

const clickHandler = () => {
navigate(`/personalBlock/${blockId}`, {
navigate(`${blockId}`, {
state: { highlightColor, progress },
});
};
Expand Down

0 comments on commit 0bc96d6

Please sign in to comment.