From b8a0d239d6f71bf1728fc492e6eceba41210f3ba Mon Sep 17 00:00:00 2001 From: Joshua Kitenge Date: Thu, 19 Dec 2024 13:07:58 +0000 Subject: [PATCH] use Oulet #1154 --- src/App.tsx | 4 ++-- ...nt.test.tsx => manufacturerContainer.component.test.tsx} | 6 +++--- ...er.component.tsx => manufacturerContainer.component.tsx} | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/manufacturer/{manufacturer.component.test.tsx => manufacturerContainer.component.test.tsx} (91%) rename src/manufacturer/{manufacturer.component.tsx => manufacturerContainer.component.tsx} (95%) diff --git a/src/App.tsx b/src/App.tsx index 2965f0e2d..d7212f304 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -25,7 +25,7 @@ import { HomePage } from './homePage/homePage.component'; import IMSThemeProvider from './imsThemeProvider.component'; import Items from './items/items.component'; import ItemsLandingPage from './items/itemsLandingPage.component'; -import Manufacturer from './manufacturer/manufacturer.component'; +import ManufacturerContainer from './manufacturer/manufacturerContainer.component'; import ManufacturerLandingPage from './manufacturer/manufacturerLandingPage.component'; import ManufacturerTable from './manufacturer/manufacturersTable.component'; import Preloader from './preloader/preloader.component'; @@ -92,7 +92,7 @@ const router = createBrowserRouter([ { path: paths.systems, Component: Systems }, { path: paths.manufacturers, - Component: Manufacturer, + Component: ManufacturerContainer, children: [ { path: '', Component: ManufacturerTable }, { path: paths.manufacturer, Component: ManufacturerLandingPage }, diff --git a/src/manufacturer/manufacturer.component.test.tsx b/src/manufacturer/manufacturerContainer.component.test.tsx similarity index 91% rename from src/manufacturer/manufacturer.component.test.tsx rename to src/manufacturer/manufacturerContainer.component.test.tsx index 68e9c5e3f..aacfc8d85 100644 --- a/src/manufacturer/manufacturer.component.test.tsx +++ b/src/manufacturer/manufacturerContainer.component.test.tsx @@ -1,7 +1,7 @@ import { screen, waitFor } from '@testing-library/react'; import userEvent, { UserEvent } from '@testing-library/user-event'; import { renderComponentWithRouterProvider } from '../testUtils'; -import Manufacturer from './manufacturer.component'; +import ManufacturerContainer from './manufacturerContainer.component'; const mockedUseNavigate = vi.fn(); @@ -10,11 +10,11 @@ vi.mock('react-router-dom', async () => ({ useNavigate: () => mockedUseNavigate, })); -describe('Manufacturer', () => { +describe('Manufacturer Container', () => { let user: UserEvent; const createView = (path: string, isLandingPage?: boolean) => { return renderComponentWithRouterProvider( - , + , isLandingPage ? 'manufacturer' : 'manufacturers', path ); diff --git a/src/manufacturer/manufacturer.component.tsx b/src/manufacturer/manufacturerContainer.component.tsx similarity index 95% rename from src/manufacturer/manufacturer.component.tsx rename to src/manufacturer/manufacturerContainer.component.tsx index 57ae05c76..a08dd02e6 100644 --- a/src/manufacturer/manufacturer.component.tsx +++ b/src/manufacturer/manufacturerContainer.component.tsx @@ -6,7 +6,7 @@ import { useGetManufacturer } from '../api/manufacturers'; import { paths } from '../App'; import Breadcrumbs from '../view/breadcrumbs.component'; -function Manufacturer() { +function ManufacturerContainer() { const { manufacturer_id: manufacturerId } = useParams(); const { data: manufacturerData } = useGetManufacturer(manufacturerId); @@ -60,4 +60,4 @@ function Manufacturer() { ); } -export default Manufacturer; +export default ManufacturerContainer;