From 26bae42c984977c4806b49041e6f27b3ef5daff7 Mon Sep 17 00:00:00 2001 From: Jake Howell Date: Mon, 3 Aug 2026 19:08:44 +1000 Subject: [PATCH] refactor(site): rename `<404Page />` to `` (#27731) The component was already named `NotFoundPage`, but it lived under `pages/404Page/404Page.tsx`. Rename the directory and file to match the component name, and update the lazy import and organization settings import paths. --- site/src/modules/management/OrganizationSettingsLayout.tsx | 2 +- .../NotFoundPage.stories.tsx} | 2 +- .../{404Page/404Page.tsx => NotFoundPage/NotFoundPage.tsx} | 0 site/src/router.tsx | 2 +- 4 files changed, 3 insertions(+), 3 deletions(-) rename site/src/pages/{404Page/404Page.stories.tsx => NotFoundPage/NotFoundPage.stories.tsx} (87%) rename site/src/pages/{404Page/404Page.tsx => NotFoundPage/NotFoundPage.tsx} (100%) diff --git a/site/src/modules/management/OrganizationSettingsLayout.tsx b/site/src/modules/management/OrganizationSettingsLayout.tsx index 49600f1289..c9b86395a3 100644 --- a/site/src/modules/management/OrganizationSettingsLayout.tsx +++ b/site/src/modules/management/OrganizationSettingsLayout.tsx @@ -18,7 +18,7 @@ import { canViewOrganization, type OrganizationPermissions, } from "#/modules/permissions/organizations"; -import NotFoundPage from "#/pages/404Page/404Page"; +import NotFoundPage from "#/pages/NotFoundPage/NotFoundPage"; export const OrganizationSettingsContext = createContext< OrganizationSettingsValue | undefined diff --git a/site/src/pages/404Page/404Page.stories.tsx b/site/src/pages/NotFoundPage/NotFoundPage.stories.tsx similarity index 87% rename from site/src/pages/404Page/404Page.stories.tsx rename to site/src/pages/NotFoundPage/NotFoundPage.stories.tsx index 3253f3c4ac..65be4de338 100644 --- a/site/src/pages/404Page/404Page.stories.tsx +++ b/site/src/pages/NotFoundPage/NotFoundPage.stories.tsx @@ -1,5 +1,5 @@ import type { Meta, StoryObj } from "@storybook/react-vite"; -import NotFoundPage from "./404Page"; +import NotFoundPage from "./NotFoundPage"; const meta: Meta = { title: "components/NotFoundPage", diff --git a/site/src/pages/404Page/404Page.tsx b/site/src/pages/NotFoundPage/NotFoundPage.tsx similarity index 100% rename from site/src/pages/404Page/404Page.tsx rename to site/src/pages/NotFoundPage/NotFoundPage.tsx diff --git a/site/src/router.tsx b/site/src/router.tsx index 89a146ed59..54e955181a 100644 --- a/site/src/router.tsx +++ b/site/src/router.tsx @@ -32,7 +32,7 @@ import WorkspacesPage from "./pages/WorkspacesPage/WorkspacesPage"; // Lazy load pages // - Pages that are secondary, not in the main navigation or not usually accessed // - Pages that use heavy dependencies like charts or time libraries -const NotFoundPage = lazy(() => import("./pages/404Page/404Page")); +const NotFoundPage = lazy(() => import("./pages/NotFoundPage/NotFoundPage")); const DeploymentSettingsLayout = lazy( () => import("./modules/management/DeploymentSettingsLayout"), );