Skip to content

Commit

Permalink
style: format code with prettier and standardjs
Browse files Browse the repository at this point in the history
Format code with prettier and standardjs

This commit fixes the style issues introduced in e7393e7 according to the output
from Prettier and StandardJS.

Details: https://app.deepsource.com/gh/wkylin/pro-react-admin/transform/1646af88-c75d-4570-a67a-a957b9c11a28/
  • Loading branch information
deepsource-autofix[bot] committed Jun 19, 2023
1 parent e7393e7 commit 936e299
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routers/authRouter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const AuthRouter = (props) => {
if (!route?.auth) return props.children

const { token } = getLocalStorage('token') || { token: null }
if (!token) return <Navigate to="/signin" replace />
if (!token) return <Navigate to='/signin' replace />

// * 后端返回有权限路由列表 暂时硬编码 需要结合 proSecNav组件中的menuItems
const routerList = ['/', '/home', '/demo', '/parallax', '/dashboard', '/tilt', '/prism']
if (routerList.indexOf(pathname) === -1) return <Navigate to="/403" replace />
if (routerList.indexOf(pathname) === -1) return <Navigate to='/403' replace />

return props.children
}
Expand Down

0 comments on commit 936e299

Please sign in to comment.