mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: format with prettier
This commit is contained in:
parent
03fb09c3d6
commit
a147ad6610
164 changed files with 11257 additions and 8154 deletions
|
|
@ -1,12 +1,12 @@
|
|||
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
|
||||
import { AppRouterInstance } from 'next/dist/shared/lib/app-router-context.shared-runtime'
|
||||
|
||||
export const denyAccessToUser = (error: any, router: AppRouterInstance) => {
|
||||
if (error.status === 401) {
|
||||
router.push("/login");
|
||||
router.push('/login')
|
||||
}
|
||||
|
||||
if (error.status === 403) {
|
||||
router.push("/login");
|
||||
router.push('/login')
|
||||
// TODO : add a message to the user to tell him he is not allowed to access this page, route to /error
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue