mirror of https://github.com/buster-so/buster.git
remove app root file path
This commit is contained in:
parent
035e86b6ae
commit
25dd704dd4
|
@ -12,7 +12,7 @@ export default async function Login() {
|
|||
if (user?.id) {
|
||||
return redirect(
|
||||
createBusterRoute({
|
||||
route: BusterRoutes.APP_ROOT
|
||||
route: BusterRoutes.APP_HOME
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ export const ResetPasswordForm: React.FC<{
|
|||
setCountdown((prev) => {
|
||||
if (prev === 0) {
|
||||
clearInterval(interval);
|
||||
router.replace(createBusterRoute({ route: BusterRoutes.APP_ROOT }));
|
||||
router.replace(createBusterRoute({ route: BusterRoutes.APP_HOME }));
|
||||
return 0;
|
||||
}
|
||||
return prev - 1;
|
||||
|
|
|
@ -17,7 +17,7 @@ type Story = StoryObj<typeof Breadcrumb>;
|
|||
export const Default: Story = {
|
||||
args: {
|
||||
items: [
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } },
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_HOME } },
|
||||
{ label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } },
|
||||
{ label: 'Current Dataset' }
|
||||
]
|
||||
|
@ -27,7 +27,7 @@ export const Default: Story = {
|
|||
export const WithDropdown: Story = {
|
||||
args: {
|
||||
items: [
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } },
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_HOME } },
|
||||
{
|
||||
label: null,
|
||||
dropdown: [
|
||||
|
@ -44,7 +44,7 @@ export const WithDropdown: Story = {
|
|||
export const CustomActiveIndex: Story = {
|
||||
args: {
|
||||
items: [
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } },
|
||||
{ label: 'Home', route: { route: BusterRoutes.APP_HOME } },
|
||||
{ label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } },
|
||||
{ label: 'Settings', route: { route: BusterRoutes.SETTINGS_API_KEYS } },
|
||||
{ label: 'Profile' }
|
||||
|
|
|
@ -25,7 +25,7 @@ const mockItems = [
|
|||
id: '1',
|
||||
label: 'Home',
|
||||
icon: <Window />,
|
||||
route: BusterRoutes.APP_ROOT
|
||||
route: BusterRoutes.APP_HOME
|
||||
},
|
||||
{
|
||||
id: '2',
|
||||
|
@ -88,7 +88,7 @@ export const WithLongContent: Story = {
|
|||
id: `item-${i}`,
|
||||
label: `Menu Item ${i + 1}`,
|
||||
icon: <Window width="1.25em" height="1.25em" />,
|
||||
route: BusterRoutes.APP_ROOT
|
||||
route: BusterRoutes.APP_HOME
|
||||
}))
|
||||
}
|
||||
],
|
||||
|
@ -121,7 +121,7 @@ export const ScrollAndTruncationTest: Story = {
|
|||
id: `short-${i}`,
|
||||
label: `Item ${i + 1}`,
|
||||
icon: <Window width="1.25em" height="1.25em" />,
|
||||
route: BusterRoutes.APP_ROOT
|
||||
route: BusterRoutes.APP_HOME
|
||||
}))
|
||||
},
|
||||
{
|
||||
|
|
|
@ -38,7 +38,7 @@ export const Default: Story = {
|
|||
args: {
|
||||
label: 'Home',
|
||||
icon: <HouseModern />,
|
||||
route: BusterRoutes.APP_ROOT,
|
||||
route: BusterRoutes.APP_HOME,
|
||||
id: 'home'
|
||||
}
|
||||
};
|
||||
|
|
|
@ -46,7 +46,7 @@ export const RoutePrefetcher: React.FC = React.memo(() => {
|
|||
PRIORITY_ROUTES.forEach((route) => {
|
||||
// For routes that don't require additional parameters
|
||||
if (
|
||||
route === BusterRouteEnum.APP_ROOT ||
|
||||
route === BusterRouteEnum.APP_HOME ||
|
||||
route === BusterRouteEnum.APP_COLLECTIONS ||
|
||||
route === BusterRouteEnum.APP_DASHBOARDS ||
|
||||
route === BusterRouteEnum.APP_METRIC ||
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
export enum BusterAppRoutes {
|
||||
APP_ROOT = '/app',
|
||||
APP_HOME = '/app/home',
|
||||
APP_COLLECTIONS = '/app/collections',
|
||||
APP_COLLECTIONS_ID = '/app/collections/:collectionId',
|
||||
|
@ -38,7 +37,6 @@ export enum BusterAppRoutes {
|
|||
}
|
||||
|
||||
export type BusterAppRoutesWithArgs = {
|
||||
[BusterAppRoutes.APP_ROOT]: { route: BusterAppRoutes.APP_ROOT };
|
||||
[BusterAppRoutes.APP_HOME]: { route: BusterAppRoutes.APP_HOME };
|
||||
[BusterAppRoutes.APP_COLLECTIONS]: { route: BusterAppRoutes.APP_COLLECTIONS };
|
||||
[BusterAppRoutes.APP_COLLECTIONS_ID]: {
|
||||
|
|
|
@ -116,7 +116,7 @@ export const signUp = async ({ email, password }: { email: string; password: str
|
|||
|
||||
return redirect(
|
||||
createBusterRoute({
|
||||
route: BusterRoutes.APP_ROOT
|
||||
route: BusterRoutes.APP_HOME
|
||||
})
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue