From 9821d0395ce8d2dfa8e983198f7284114193d42c Mon Sep 17 00:00:00 2001 From: Salam-vsem Date: Mon, 19 May 2025 20:26:34 +0300 Subject: [PATCH] add custom 404 page --- src/i18n/ui.ts | 5 +++-- src/pages/404.astro | 13 +++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 src/pages/404.astro diff --git a/src/i18n/ui.ts b/src/i18n/ui.ts index 3719f81..b9dc5ca 100644 --- a/src/i18n/ui.ts +++ b/src/i18n/ui.ts @@ -32,8 +32,7 @@ export const ui = { 'coaches.subtitle': 'Вашему вниманию! Представляем наш тренерский состав', 'coaches.link': 'Подробнее', // Slider Section - 'slider.title': - 'НАШ ТРЕНАЖЕРНЫЙ ЗАЛ', + 'slider.title': 'НАШ ТРЕНАЖЕРНЫЙ ЗАЛ', 'slider.subtitle': 'Современное оборудование в просторном зале', // Services Section 'services.title': 'НАШИ УСЛУГИ', @@ -47,6 +46,7 @@ export const ui = { 'footer.logo': 'THEREALSKILL', 'footer.copyright': 'Все права защищены. Политика конфиденциальности.', 'coaches.socialMedias.title': (name: string) => `${name} в соцсетях`, + '404.title': 'Страница не найдена', }, en: { 'seo.meta.description': @@ -88,5 +88,6 @@ export const ui = { 'footer.logo': 'THEREALSKILL', 'footer.copyright': 'All rights reserved. Privacy Policy.', 'coaches.socialMedias.title': (name: string) => `${name} in social medias`, + '404.title': 'Страница не найдена', }, } as const diff --git a/src/pages/404.astro b/src/pages/404.astro new file mode 100644 index 0000000..b5571ed --- /dev/null +++ b/src/pages/404.astro @@ -0,0 +1,13 @@ +--- +import { useTranslations } from '@/i18n/utils' +import BaseLayout from '@/layouts/BaseLayout.astro' + +const { lang } = Astro.params +const t = useTranslations(lang) +--- + + +
+

{t('404.title')}

+
+