From e40db96e288a64aadd13bcbb119f3fc6bbae0c7e Mon Sep 17 00:00:00 2001 From: genj11 Date: Tue, 1 Apr 2025 21:13:57 +0900 Subject: [PATCH 1/4] fix: add usePathWithLocal composables --- apps/web/app/components/FooterPageSection.vue | 12 ++++++------ apps/web/app/components/SponsorPageSection.vue | 6 +++--- apps/web/app/components/ticket/NamecardSection.vue | 5 +++-- apps/web/app/composables/usePathWithLocale.ts | 14 ++++++++++++++ apps/web/app/error.vue | 6 +++--- apps/web/app/pages/code-of-conduct.vue | 8 +++----- apps/web/app/pages/tokusho.vue | 8 +++----- 7 files changed, 35 insertions(+), 24 deletions(-) create mode 100644 apps/web/app/composables/usePathWithLocale.ts diff --git a/apps/web/app/components/FooterPageSection.vue b/apps/web/app/components/FooterPageSection.vue index 4cea9341..fffb9737 100644 --- a/apps/web/app/components/FooterPageSection.vue +++ b/apps/web/app/components/FooterPageSection.vue @@ -2,7 +2,7 @@ import { useI18n } from '#i18n' import { useColor, useTypography } from '@vuejs-jp/composable' import { useLocaleCurrent } from '~/composables/useLocaleCurrent' -import { useWithBase } from '#imports' +import { usePathWithLocale } from '#imports' //#region types type LinkList = { href: string @@ -15,7 +15,7 @@ const { t } = useI18n() const { path: localePath } = useLocaleCurrent() const { color } = useColor() const { fontSize } = useTypography() -const withBase = useWithBase() +const pathWithLocale = usePathWithLocale() //#endregion //#region private variables @@ -39,19 +39,19 @@ const snsLinkList: LinkList[] = [ ] const internalLinkList: LinkList[] = [ { - href: withBase('/events'), + href: pathWithLocale('/events'), text: 'related_events.title', }, { - href: withBase('/privacy'), + href: pathWithLocale('/privacy'), text: 'privacy.title', }, { - href: withBase('/code-of-conduct'), + href: pathWithLocale('/code-of-conduct'), text: 'code_of_conduct.title', }, { - href: withBase('/tokusho'), + href: pathWithLocale('/tokusho'), text: 'tokusho.title', }, ] diff --git a/apps/web/app/components/SponsorPageSection.vue b/apps/web/app/components/SponsorPageSection.vue index e359ad73..1a843e61 100644 --- a/apps/web/app/components/SponsorPageSection.vue +++ b/apps/web/app/components/SponsorPageSection.vue @@ -1,6 +1,6 @@