diff --git a/PTG/src/Header.test.tsx b/PTG/src/Header.test.tsx index ebc4615..903800b 100644 --- a/PTG/src/Header.test.tsx +++ b/PTG/src/Header.test.tsx @@ -9,10 +9,10 @@ describe("Header", () => { expect( screen.getByRole("link", { name: "Pokémon Team Generator" }), - ).toHaveAttribute("href", "/"); + ).toHaveAttribute("href", "/project1/"); expect(screen.getByRole("link", { name: "About" })).toHaveAttribute( "href", - "/about", + "/project1/about", ); }); }); diff --git a/PTG/src/Header.tsx b/PTG/src/Header.tsx index b99af90..b86b77b 100644 --- a/PTG/src/Header.tsx +++ b/PTG/src/Header.tsx @@ -5,10 +5,10 @@ export default function Header() { return (
- +

Pokémon Team Generator

- + About
diff --git a/PTG/src/main.tsx b/PTG/src/main.tsx index 406eaae..dcd7bc8 100644 --- a/PTG/src/main.tsx +++ b/PTG/src/main.tsx @@ -11,11 +11,11 @@ const queryClient = new QueryClient(); const router = createBrowserRouter([ { - path: "/", + path: "/project1/", element: , }, { - path: "/about", + path: "/project1/about", element: , }, { diff --git a/PTG/vite.config.ts b/PTG/vite.config.ts index ecd0d56..8e95c4a 100644 --- a/PTG/vite.config.ts +++ b/PTG/vite.config.ts @@ -14,4 +14,5 @@ export default defineConfig({ isolate: false, setupFiles: './src/test/setup.ts', }, + base: '/project1', })