refactor: organized pages based on domain
This commit is contained in:
@@ -14,7 +14,7 @@ interface Route {
|
||||
|
||||
export const getRoutes = (
|
||||
auth: string | null,
|
||||
roles: ItemWithSubItems[]
|
||||
roles: ItemWithSubItems[],
|
||||
): Route[] => {
|
||||
let generalRoutes: Route[] = auth
|
||||
? [
|
||||
@@ -34,7 +34,7 @@ export const getRoutes = (
|
||||
role?.subItems.map((item) => ({
|
||||
path: item.path,
|
||||
component: item.component,
|
||||
}))
|
||||
})),
|
||||
);
|
||||
|
||||
if (roles) {
|
||||
|
||||
@@ -23,7 +23,7 @@ export function makeRouter(auth: string | null, roles: ItemWithSubItems[]) {
|
||||
getParentRoute: () => rootRoute,
|
||||
path,
|
||||
component,
|
||||
}) as AnyRoute
|
||||
}) as AnyRoute,
|
||||
);
|
||||
|
||||
const notFoundRoute = new Route({
|
||||
|
||||
Reference in New Issue
Block a user