feature/page404 #27

Merged
237x237 merged 3 commits from feature/page404 into main 2024-11-17 11:17:54 +03:00
6 changed files with 67 additions and 1 deletions

View File

@ -29,6 +29,9 @@
"dry-wash.arm.master.sideBar.title": " Сухой мастер", "dry-wash.arm.master.sideBar.title": " Сухой мастер",
"dry-wash.arm.master.sideBar.title.master": "Мастера", "dry-wash.arm.master.sideBar.title.master": "Мастера",
"dry-wash.arm.master.sideBar.title.orders": "Заказы", "dry-wash.arm.master.sideBar.title.orders": "Заказы",
"dry-wash.notFound.title": "Страница не найдена",
"dry-wash.notFound.description": "К сожалению, запрашиваемая вами страница не существует.",
"dry-wash.notFound.button.back": " Вернуться на главную",
"dry-wash.errorBoundary.title":"Что-то пошло не так", "dry-wash.errorBoundary.title":"Что-то пошло не так",
"dry-wash.errorBoundary.description": " Мы уже работаем над исправлением проблемы", "dry-wash.errorBoundary.description": " Мы уже работаем над исправлением проблемы",
"dry-wash.errorBoundary.button.reload": "Перезагрузить страницу" "dry-wash.errorBoundary.button.reload": "Перезагрузить страницу"

17
package-lock.json generated
View File

@ -15,6 +15,7 @@
"@emotion/react": "^11.4.1", "@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0", "@emotion/styled": "^11.3.0",
"@fontsource/open-sans": "^5.1.0", "@fontsource/open-sans": "^5.1.0",
"@lottiefiles/react-lottie-player": "^3.5.4",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"express": "^4.21.1", "express": "^4.21.1",
"framer-motion": "^6.2.8", "framer-motion": "^6.2.8",
@ -3447,6 +3448,17 @@
"tslib": "2" "tslib": "2"
} }
}, },
"node_modules/@lottiefiles/react-lottie-player": {
"version": "3.5.4",
"resolved": "https://registry.npmjs.org/@lottiefiles/react-lottie-player/-/react-lottie-player-3.5.4.tgz",
"integrity": "sha512-2FptWtHQ+o7MzdsMKSvNZ1Mz7xtKSYI0WL9HjZ1r+CvsXR3lbLQUDp7Pwx6qhg0Akm4VluQ+8/D1S1fcr1Ao4w==",
"dependencies": {
"lottie-web": "^5.12.2"
},
"peerDependencies": {
"react": "16 - 18"
}
},
"node_modules/@nodelib/fs.scandir": { "node_modules/@nodelib/fs.scandir": {
"version": "2.1.5", "version": "2.1.5",
"resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
@ -7806,6 +7818,11 @@
"loose-envify": "cli.js" "loose-envify": "cli.js"
} }
}, },
"node_modules/lottie-web": {
"version": "5.12.2",
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz",
"integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg=="
},
"node_modules/lru-cache": { "node_modules/lru-cache": {
"version": "10.4.3", "version": "10.4.3",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.4.3.tgz",

View File

@ -23,6 +23,7 @@
"@emotion/react": "^11.4.1", "@emotion/react": "^11.4.1",
"@emotion/styled": "^11.3.0", "@emotion/styled": "^11.3.0",
"@fontsource/open-sans": "^5.1.0", "@fontsource/open-sans": "^5.1.0",
"@lottiefiles/react-lottie-player": "^3.5.4",
"@types/react": "^18.3.12", "@types/react": "^18.3.12",
"express": "^4.21.1", "express": "^4.21.1",
"framer-motion": "^6.2.8", "framer-motion": "^6.2.8",

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,43 @@
import React from 'react';
import { Text, Button, Center, VStack, Heading } from '@chakra-ui/react';
import { Link } from 'react-router-dom';
import { Player } from '@lottiefiles/react-lottie-player';
import animate from '../../assets/animation/notFound.json';
import i18next from 'i18next';
const NotFound = () => {
return (
<Center minH='100vh'>
<VStack spacing={4} textAlign='center'>
<Player
autoplay
loop
src={animate}
style={{
height: '100%',
width: '100%',
maxHeight: '450px',
maxWidth: '450px',
}}
/>
<Heading fontSize='xl'>
{i18next.t(`dry-wash.arm.notFound.title`)}
</Heading>
<Text fontSize='lg'>
{i18next.t(`dry-wash.arm.notFound.description`)}
</Text>
<Button
as={Link}
to='/dry-wash'
colorScheme='teal'
size='lg'
variant='outline'
>
{i18next.t(`dry-wash.arm.notFound.button.back`)}
</Button>
</VStack>
</Center>
);
};
export default NotFound;

View File

@ -2,6 +2,7 @@ import React, { lazy, Suspense } from 'react';
import { Routes, Route } from 'react-router-dom'; import { Routes, Route } from 'react-router-dom';
import { PageSpinner } from './components'; import { PageSpinner } from './components';
import Arm from './pages/arm'; import Arm from './pages/arm';
import NotFound from './pages/notFound/notFound';
const Landing = lazy(() => import('./pages/landing')); const Landing = lazy(() => import('./pages/landing'));
const OrderForm = lazy(() => import('./pages/order-form')); const OrderForm = lazy(() => import('./pages/order-form'));
@ -17,9 +18,9 @@ const Routers = () => {
<Route path='order-view' element={<OrderView />} /> <Route path='order-view' element={<OrderView />} />
</Route> </Route>
<Route path='/dry-wash/arm/*' element={<Arm />}></Route> <Route path='/dry-wash/arm/*' element={<Arm />}></Route>
<Route path='*' element={<NotFound />} />
</Routes> </Routes>
</Suspense> </Suspense>
); );
}; };