From 745a6ef51ccc272b2dc1c13d4c0f41c066d31318 Mon Sep 17 00:00:00 2001 From: genj11 Date: Tue, 1 Apr 2025 15:56:41 +0900 Subject: [PATCH 1/2] fix: add baseURL on GlobalHeader links --- apps/web/app/components/GlobalHeader.vue | 6 ++++-- apps/web/app/composables/useWithBase.ts | 11 +++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 apps/web/app/composables/useWithBase.ts diff --git a/apps/web/app/components/GlobalHeader.vue b/apps/web/app/components/GlobalHeader.vue index 148510cb..ddd85948 100644 --- a/apps/web/app/components/GlobalHeader.vue +++ b/apps/web/app/components/GlobalHeader.vue @@ -1,5 +1,5 @@ diff --git a/apps/web/app/composables/useWithBase.ts b/apps/web/app/composables/useWithBase.ts new file mode 100644 index 00000000..bb767eb1 --- /dev/null +++ b/apps/web/app/composables/useWithBase.ts @@ -0,0 +1,11 @@ +import { useRuntimeConfig } from '#app' + +export function useWithBase() { + const baseUrl = useRuntimeConfig().app.baseURL + + function withBase(path: string) { + return (baseUrl + path).replace(/\/\//g, '/') + } + + return withBase +} \ No newline at end of file From 84c7d28c401ad5f3e6e4c2bb95f9fd1b4d91d0da Mon Sep 17 00:00:00 2001 From: genj11 Date: Tue, 1 Apr 2025 16:14:38 +0900 Subject: [PATCH 2/2] fix: add basePath on TopPageSection links & remove basePath on GlobalHeader --- apps/web/app/components/GlobalHeader.vue | 6 ++---- apps/web/app/components/TopPageSection.vue | 6 +++++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/apps/web/app/components/GlobalHeader.vue b/apps/web/app/components/GlobalHeader.vue index ddd85948..148510cb 100644 --- a/apps/web/app/components/GlobalHeader.vue +++ b/apps/web/app/components/GlobalHeader.vue @@ -1,5 +1,5 @@ diff --git a/apps/web/app/components/TopPageSection.vue b/apps/web/app/components/TopPageSection.vue index da83e22d..3e197eb7 100644 --- a/apps/web/app/components/TopPageSection.vue +++ b/apps/web/app/components/TopPageSection.vue @@ -1,11 +1,15 @@