From 8bfd0d77505643e0210f927e65a4fed18b579302 Mon Sep 17 00:00:00 2001 From: striker Date: Sat, 14 Mar 2026 01:37:23 +0300 Subject: [PATCH] Add 404 page, three phone numbers, fix nginx try_files --- index.html | 4 ++-- src/App.jsx | 17 +++++++++++++++-- src/components/Footer.jsx | 7 +++++-- src/pages/Home.jsx | 14 ++++++++++---- src/pages/NotFound.jsx | 27 +++++++++++++++++++++++++++ src/translations/en.js | 1 + src/translations/ru.js | 1 + 7 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 src/pages/NotFound.jsx diff --git a/index.html b/index.html index f0f04e2..698c728 100644 --- a/index.html +++ b/index.html @@ -51,7 +51,7 @@ "url": "https://sag24.ru", "logo": "https://sag24.ru/favicon.svg", "image": "https://sag24.ru/og-image.svg", - "telephone": "+74953637476", + "telephone": ["+74953637476", "+74953637335", "+74959454456"], "email": "info@sag24.ru", "address": { "@type": "PostalAddress", @@ -97,7 +97,7 @@ }, "contactPoint": { "@type": "ContactPoint", - "telephone": "+74953637476", + "telephone": ["+74953637476", "+74953637335", "+74959454456"], "contactType": "customer service", "availableLanguage": ["Russian", "English"] } diff --git a/src/App.jsx b/src/App.jsx index 317b3e0..5ac3327 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -1,8 +1,9 @@ -import React, { useEffect } from 'react' +import React, { useEffect, useState } from 'react' import { LanguageProvider, useLanguage } from './contexts/LanguageContext.jsx' import Navigation from './components/Navigation.jsx' import Footer from './components/Footer.jsx' import Home from './pages/Home.jsx' +import NotFound from './pages/NotFound.jsx' function LangSync() { const { lang } = useLanguage() @@ -12,13 +13,25 @@ function LangSync() { return null } +function Router() { + const [path, setPath] = useState(window.location.pathname) + useEffect(() => { + const handler = () => setPath(window.location.pathname) + window.addEventListener('popstate', handler) + return () => window.removeEventListener('popstate', handler) + }, []) + + const isHome = path === '/' || path === '/index.html' + return isHome ? : +} + export default function App() { return (
- +