Skip to content

Commit

Permalink
fix(navigation): include base
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Feb 27, 2024
1 parent 2a8930a commit f9b8b01
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/context/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const NavigationProvider = (props: ParentProps) => {
}
const link = (next: Navigation) =>
new URL(
`/#${encode({
`${BASE_URL}/#${encode({
...location(),
...next,
})}`,
Expand Down Expand Up @@ -90,7 +90,7 @@ export const NavigationContext = createContext<{
navigateHome: () => undefined,
navigateWithSearchTerm: () => undefined,
linkToHome: () =>
new URL(`/#${encode(Home)}`, document.location.href).toString(),
new URL(`${BASE_URL}/#${encode(Home)}`, document.location.href).toString(),
link: () => '/#',
linkWithoutSearchTerm: () => '/#',
linkToSearch: () => '/#',
Expand Down
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const { registryEndpoint } = fromEnv({
registryEndpoint: 'REGISTRY_ENDPOINT',
})(process.env)

const base = trimTrailingSlash(process.env.BASE_URL ?? '')
const base = trimTrailingSlash(process.env.BASE_URL ?? '/map/')

// https://vitejs.dev/config/
export default defineConfig({
Expand Down

0 comments on commit f9b8b01

Please sign in to comment.