remove app root file path

This commit is contained in:
Nate Kelley 2025-03-18 14:55:11 -06:00
parent 035e86b6ae
commit 25dd704dd4
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
8 changed files with 11 additions and 13 deletions

View File

@ -12,7 +12,7 @@ export default async function Login() {
if (user?.id) { if (user?.id) {
return redirect( return redirect(
createBusterRoute({ createBusterRoute({
route: BusterRoutes.APP_ROOT route: BusterRoutes.APP_HOME
}) })
); );
} }

View File

@ -37,7 +37,7 @@ export const ResetPasswordForm: React.FC<{
setCountdown((prev) => { setCountdown((prev) => {
if (prev === 0) { if (prev === 0) {
clearInterval(interval); clearInterval(interval);
router.replace(createBusterRoute({ route: BusterRoutes.APP_ROOT })); router.replace(createBusterRoute({ route: BusterRoutes.APP_HOME }));
return 0; return 0;
} }
return prev - 1; return prev - 1;

View File

@ -17,7 +17,7 @@ type Story = StoryObj<typeof Breadcrumb>;
export const Default: Story = { export const Default: Story = {
args: { args: {
items: [ items: [
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, { label: 'Home', route: { route: BusterRoutes.APP_HOME } },
{ label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } }, { label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } },
{ label: 'Current Dataset' } { label: 'Current Dataset' }
] ]
@ -27,7 +27,7 @@ export const Default: Story = {
export const WithDropdown: Story = { export const WithDropdown: Story = {
args: { args: {
items: [ items: [
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, { label: 'Home', route: { route: BusterRoutes.APP_HOME } },
{ {
label: null, label: null,
dropdown: [ dropdown: [
@ -44,7 +44,7 @@ export const WithDropdown: Story = {
export const CustomActiveIndex: Story = { export const CustomActiveIndex: Story = {
args: { args: {
items: [ items: [
{ label: 'Home', route: { route: BusterRoutes.APP_ROOT } }, { label: 'Home', route: { route: BusterRoutes.APP_HOME } },
{ label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } }, { label: 'Datasets', route: { route: BusterRoutes.APP_DATASETS } },
{ label: 'Settings', route: { route: BusterRoutes.SETTINGS_API_KEYS } }, { label: 'Settings', route: { route: BusterRoutes.SETTINGS_API_KEYS } },
{ label: 'Profile' } { label: 'Profile' }

View File

@ -25,7 +25,7 @@ const mockItems = [
id: '1', id: '1',
label: 'Home', label: 'Home',
icon: <Window />, icon: <Window />,
route: BusterRoutes.APP_ROOT route: BusterRoutes.APP_HOME
}, },
{ {
id: '2', id: '2',
@ -88,7 +88,7 @@ export const WithLongContent: Story = {
id: `item-${i}`, id: `item-${i}`,
label: `Menu Item ${i + 1}`, label: `Menu Item ${i + 1}`,
icon: <Window width="1.25em" height="1.25em" />, 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}`, id: `short-${i}`,
label: `Item ${i + 1}`, label: `Item ${i + 1}`,
icon: <Window width="1.25em" height="1.25em" />, icon: <Window width="1.25em" height="1.25em" />,
route: BusterRoutes.APP_ROOT route: BusterRoutes.APP_HOME
})) }))
}, },
{ {

View File

@ -38,7 +38,7 @@ export const Default: Story = {
args: { args: {
label: 'Home', label: 'Home',
icon: <HouseModern />, icon: <HouseModern />,
route: BusterRoutes.APP_ROOT, route: BusterRoutes.APP_HOME,
id: 'home' id: 'home'
} }
}; };

View File

@ -46,7 +46,7 @@ export const RoutePrefetcher: React.FC = React.memo(() => {
PRIORITY_ROUTES.forEach((route) => { PRIORITY_ROUTES.forEach((route) => {
// For routes that don't require additional parameters // For routes that don't require additional parameters
if ( if (
route === BusterRouteEnum.APP_ROOT || route === BusterRouteEnum.APP_HOME ||
route === BusterRouteEnum.APP_COLLECTIONS || route === BusterRouteEnum.APP_COLLECTIONS ||
route === BusterRouteEnum.APP_DASHBOARDS || route === BusterRouteEnum.APP_DASHBOARDS ||
route === BusterRouteEnum.APP_METRIC || route === BusterRouteEnum.APP_METRIC ||

View File

@ -1,5 +1,4 @@
export enum BusterAppRoutes { export enum BusterAppRoutes {
APP_ROOT = '/app',
APP_HOME = '/app/home', APP_HOME = '/app/home',
APP_COLLECTIONS = '/app/collections', APP_COLLECTIONS = '/app/collections',
APP_COLLECTIONS_ID = '/app/collections/:collectionId', APP_COLLECTIONS_ID = '/app/collections/:collectionId',
@ -38,7 +37,6 @@ export enum BusterAppRoutes {
} }
export type BusterAppRoutesWithArgs = { export type BusterAppRoutesWithArgs = {
[BusterAppRoutes.APP_ROOT]: { route: BusterAppRoutes.APP_ROOT };
[BusterAppRoutes.APP_HOME]: { route: BusterAppRoutes.APP_HOME }; [BusterAppRoutes.APP_HOME]: { route: BusterAppRoutes.APP_HOME };
[BusterAppRoutes.APP_COLLECTIONS]: { route: BusterAppRoutes.APP_COLLECTIONS }; [BusterAppRoutes.APP_COLLECTIONS]: { route: BusterAppRoutes.APP_COLLECTIONS };
[BusterAppRoutes.APP_COLLECTIONS_ID]: { [BusterAppRoutes.APP_COLLECTIONS_ID]: {

View File

@ -116,7 +116,7 @@ export const signUp = async ({ email, password }: { email: string; password: str
return redirect( return redirect(
createBusterRoute({ createBusterRoute({
route: BusterRoutes.APP_ROOT route: BusterRoutes.APP_HOME
}) })
); );
}; };