Skip to content

Commit

Permalink
fix: router change
Browse files Browse the repository at this point in the history
  • Loading branch information
esthel7 committed Nov 30, 2023
1 parent 8995795 commit 92cba0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions front/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ const App = () => {
</IsLogin>
}
>
<Route path="" element={<></>} />
<Route path="nickname" element={<Nickname />} />
<Route path="" element={<Nickname />} />
<Route path="snowball" element={<Snowball />} />
<Route path="maindeco" element={<MainDeco />} />
</Route>
Expand Down
2 changes: 1 addition & 1 deletion front/src/router/IsLogin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const IsLogin: React.FC<{ children: ReactNode }> = ({ children }) => {
if (res.status === 200) {
const data = res.data;
console.log(data);
if (data.user.nickname === null) setUrl('/make/nickname');
if (data.user.nickname === null) setUrl('/make');
else if (data.main_snowball === null) setUrl('/make/snowball');
else navigate('/main');
}
Expand Down

0 comments on commit 92cba0e

Please sign in to comment.