From 7781c69153e3956ca14684fe9a287fbbb8a01082 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:41:29 +0100 Subject: Determines current locale with lib function --- src/components/Scotsoun.astro | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/components/Scotsoun.astro') diff --git a/src/components/Scotsoun.astro b/src/components/Scotsoun.astro index 1491ebc..a0600d1 100644 --- a/src/components/Scotsoun.astro +++ b/src/components/Scotsoun.astro @@ -2,17 +2,17 @@ import translate from '$i18n/translate'; import tSite from '$i18n/translations/site'; import tComponent from '$i18n/translations/components/scotsoun'; -import type Locale from '$types/Locale'; import type Scotsoun from '$types/Scotsoun'; import PayPalButtons from './PayPalButtons.astro'; import relativePath from '$lib/relativePath'; +import getLocaleFromPath from '$lib/getLocaleFromPath'; interface Props { - locale: Locale; scotsoun: Scotsoun; } -const { locale, scotsoun } = Astro.props; +const { scotsoun } = Astro.props; +const locale = getLocaleFromPath(Astro.url.pathname); const t = translate(locale); --- -- cgit v1.2.3