Skip to content

Commit a3d18bf

Browse files
author
Mindy.L
committed
enhance no token
1 parent 43ffc2d commit a3d18bf

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

web/src/routes/index.tsx

+8-6
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,16 @@ export const Router = () => {
138138
<Routes>
139139
<Route path="/login" element={<Login />} />
140140
<Route path="*" element={<Navigate to={"/home"} />} />
141-
<Route element={<Main />}>
141+
<Route
142+
element={
143+
<AuthStatus>
144+
<Main />
145+
</AuthStatus>
146+
}
147+
>
142148
{routers.map((item, index) => {
143149
return (
144-
<Route
145-
key={index}
146-
path={item.path}
147-
element={<AuthStatus>{item.element}</AuthStatus>}
148-
>
150+
<Route key={index} path={item.path} element={item.element}>
149151
{item?.children?.map((childrenItem, childrenIndex) => {
150152
return (
151153
<Route

0 commit comments

Comments
 (0)