From f19fc78a151c761642cf7c9b654e0da9db3c4418 Mon Sep 17 00:00:00 2001 From: Joe Carstairs <65492573+Sycamost@users.noreply.github.com> Date: Sun, 13 Aug 2023 20:33:03 +0100 Subject: More robust relative path handling --- src/components/LallansIssue.astro | 5 ++++- src/components/LallansIssuesGallery.astro | 12 +++++++++++- src/components/Scotsoun.astro | 5 ++++- src/components/ScotsounCdGallery.astro | 12 +++++++++++- src/lib/relativePath.ts | 12 ++++++++++++ src/pages/[locale]/furthsettins/index.astro | 5 +++-- .../lallans/[issueNumber]/payment-success-confirmation.astro | 2 +- src/pages/[locale]/furthsettins/lallans/index.astro | 2 +- .../scotsoun/[scotsounId]/payment-success-confirmation.astro | 2 +- src/pages/[locale]/furthsettins/scotsoun/index.astro | 2 +- 10 files changed, 49 insertions(+), 10 deletions(-) create mode 100644 src/lib/relativePath.ts (limited to 'src') diff --git a/src/components/LallansIssue.astro b/src/components/LallansIssue.astro index c71755b..a07d345 100644 --- a/src/components/LallansIssue.astro +++ b/src/components/LallansIssue.astro @@ -1,6 +1,7 @@ --- import translate from '$i18n/translate'; import tSite from '$i18n/translations/site'; +import relativePath from '$lib/relativePath'; import type LallansIssue from '$types/LallansIssue'; import type Locale from '$types/Locale'; import LallansIssueContributions from './LallansIssueContributions.astro'; @@ -25,7 +26,9 @@ const t = translate(locale);
-
-
{t(tPage, { key: 'payment-confirmation-message', issueNumber: `${issueNumber}` })}
- + {t(tPage, { key: 'back-button-text', issueNumber: `${issueNumber}` })}{t(tPage, { key: 'payment-confirmation-message', scotsounId })}
- + {t(tPage, { key: 'back-button-text', scotsounId })}