fix: not found AppRouterInstance type

This commit is contained in:
swve 2023-09-19 20:03:08 +02:00
parent 8e9aac9bc3
commit 93def5a59e
2 changed files with 5 additions and 5 deletions

View file

@ -1,4 +1,4 @@
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context";
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
import { NextRouter } from "next/router";
export const denyAccessToUser = (error: any, router: AppRouterInstance) => {
@ -10,5 +10,4 @@ export const denyAccessToUser = (error : any, router: AppRouterInstance) => {
router.push("/login");
// TODO : add a message to the user to tell him he is not allowed to access this page, route to /error
}
}
};

View file

@ -1,4 +1,5 @@
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context";
import { AppRouterInstance } from "next/dist/shared/lib/app-router-context.shared-runtime";
import { denyAccessToUser } from "../react/middlewares/views";
import { getUriWithOrg, LEARNHOUSE_DOMAIN, LEARNHOUSE_HTTP_PROTOCOL } from "@services/config/config";