From 53392547495883da69f7d4b7583c87e420e4b9bd Mon Sep 17 00:00:00 2001 From: Joshua Kitenge Date: Mon, 6 Jan 2025 13:14:51 +0000 Subject: [PATCH] Renamed systemsContainer to systemsLayout for better clarity #1213 --- src/App.tsx | 4 ++-- ....test.tsx.snap => systemsLayout.component.test.tsx.snap} | 4 ++-- src/systems/systems.component.tsx | 2 +- ....component.test.tsx => systemsLayout.component.test.tsx} | 6 +++--- ...sContainer.component.tsx => systemsLayout.component.tsx} | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/systems/__snapshots__/{systemsContainer.component.test.tsx.snap => systemsLayout.component.test.tsx.snap} (97%) rename src/systems/{systemsContainer.component.test.tsx => systemsLayout.component.test.tsx} (93%) rename src/systems/{systemsContainer.component.tsx => systemsLayout.component.tsx} (96%) diff --git a/src/App.tsx b/src/App.tsx index f62a9b1b5..d752fd650 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -39,7 +39,7 @@ import { tokenRefreshed, } from './state/scigateway.actions'; import Systems from './systems/systems.component'; -import SystemsContainer from './systems/systemsContainer.component'; +import SystemsLayout from './systems/systemsLayout.component'; import ViewTabs from './view/viewTabs.component'; export const paths = { @@ -114,7 +114,7 @@ const router = createBrowserRouter([ }, { path: paths.systems, - Component: SystemsContainer, + Component: SystemsLayout, children: [ { index: true, Component: Systems }, { path: paths.system, Component: Systems }, diff --git a/src/systems/__snapshots__/systemsContainer.component.test.tsx.snap b/src/systems/__snapshots__/systemsLayout.component.test.tsx.snap similarity index 97% rename from src/systems/__snapshots__/systemsContainer.component.test.tsx.snap rename to src/systems/__snapshots__/systemsLayout.component.test.tsx.snap index 4d31b83ad..4277cde66 100644 --- a/src/systems/__snapshots__/systemsContainer.component.test.tsx.snap +++ b/src/systems/__snapshots__/systemsLayout.component.test.tsx.snap @@ -1,6 +1,6 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`Systems Container > renders root systems correctly 1`] = ` +exports[`Systems Layout > renders root systems correctly 1`] = `
renders root systems correctly 1`] = ` `; -exports[`Systems Container > renders units breadcrumbs correctly 1`] = ` +exports[`Systems Layout > renders units breadcrumbs correctly 1`] = `
({ useNavigate: () => mockedUseNavigate, })); -describe('Systems Container', () => { +describe('Systems Layout', () => { let user: UserEvent; beforeEach(() => { @@ -19,7 +19,7 @@ describe('Systems Container', () => { }); const createView = (path: string, urlPathKey: keyof typeof paths) => { return renderComponentWithRouterProvider( - , + , urlPathKey, path ); diff --git a/src/systems/systemsContainer.component.tsx b/src/systems/systemsLayout.component.tsx similarity index 96% rename from src/systems/systemsContainer.component.tsx rename to src/systems/systemsLayout.component.tsx index 135725bb7..96f1bc9f3 100644 --- a/src/systems/systemsContainer.component.tsx +++ b/src/systems/systemsLayout.component.tsx @@ -17,7 +17,7 @@ export const useNavigateToSystem = () => { ); }; -function SystemsContainer() { +function SystemsLayout() { const { system_id: systemId } = useParams(); const navigateToSystem = useNavigateToSystem(); @@ -57,4 +57,4 @@ function SystemsContainer() { ); } -export default SystemsContainer; +export default SystemsLayout;