summaryrefslogtreecommitdiff
path: root/src/components/Scotsoun.astro
diff options
context:
space:
mode:
authorJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 20:41:29 +0100
committerJoe Carstairs <65492573+Sycamost@users.noreply.github.com>2023-08-13 20:41:29 +0100
commit7781c69153e3956ca14684fe9a287fbbb8a01082 (patch)
tree6bf18977ee93608aead54dc2322c0d42c2284f78 /src/components/Scotsoun.astro
parent71eac2d383c9918645e99b6b845fb8f4faecf346 (diff)
Determines current locale with lib function
Diffstat (limited to 'src/components/Scotsoun.astro')
-rw-r--r--src/components/Scotsoun.astro6
1 files changed, 3 insertions, 3 deletions
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);
---