1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00
unleash.unleash/frontend/src/interfaces/route.ts
Fredrik Strand Oseberg 0dcf28a0f0
Refactor/lazy load (#2842)
Currently our bundle size is clocking in at: 1,798.28 kB │ gzip: 558.42 kB
After the changes: 1,299.32 kB │ gzip: 403.26 kB
2023-01-12 11:34:45 +01:00

33 lines
735 B
TypeScript

import { VoidFunctionComponent } from 'react';
import { IFlags, IUiConfig } from 'interfaces/uiConfig';
export interface IRoute {
path: string;
title: string;
type: 'protected' | 'unprotected';
layout?: string;
parent?: string;
flag?: keyof IFlags;
configFlag?: keyof IUiConfig;
hidden?: boolean;
enterprise?: boolean;
component: VoidFunctionComponent;
menu: IRouteMenu;
isStandalone?: boolean;
}
export interface INavigationMenuItem {
path: string;
title: string;
menu: IRouteMenu;
flag?: keyof IFlags;
configFlag?: keyof IUiConfig;
}
interface IRouteMenu {
mobile?: boolean;
advanced?: boolean;
adminSettings?: boolean;
isEnterprise?: boolean;
}