From 3922ca678deaab1bf8cb5c8dd6a75f5c39e9abe4 Mon Sep 17 00:00:00 2001 From: dasha Date: Sun, 9 Apr 2023 15:33:44 +0400 Subject: [PATCH] commit front 4 --- front/src/App.js | 45 +++++++++++++++++ front/src/index.js | 12 +++++ front/src/styles/ModalEdit.module.css | 22 ++++++++ front/src/styles/banner.css | 23 +++++++++ front/src/styles/index.css | 72 +++++++++++++++++++++++++++ front/src/styles/styleBlock.css | 14 ++++++ front/src/styles/styleFilmItem.css | 13 +++++ front/src/styles/styleFooter.css | 9 ++++ front/src/styles/styleHeader.css | 15 ++++++ 9 files changed, 225 insertions(+) create mode 100644 front/src/App.js create mode 100644 front/src/index.js create mode 100644 front/src/styles/ModalEdit.module.css create mode 100644 front/src/styles/banner.css create mode 100644 front/src/styles/index.css create mode 100644 front/src/styles/styleBlock.css create mode 100644 front/src/styles/styleFilmItem.css create mode 100644 front/src/styles/styleFooter.css create mode 100644 front/src/styles/styleHeader.css diff --git a/front/src/App.js b/front/src/App.js new file mode 100644 index 0000000..173405f --- /dev/null +++ b/front/src/App.js @@ -0,0 +1,45 @@ +import { useRoutes, Outlet, BrowserRouter } from 'react-router-dom' +import Films from './pages/Films' +import FilmPage from './pages/FilmPage' +import Header from './pages/components/Header' +import Footer from './pages/components/Footer' +import SearchSame from './pages/SearchSame' +import Registration from './pages/Registration' +import Sessions from './pages/Sessions' +import Orders from './pages/Orders' + +function Router(props) { + return useRoutes(props.rootRoute); +} + +export default function App() { + const routes = [ + { index: true, element: }, + { path: '/films', element: , label: 'Главная' }, + { path: '/registration', element: , label: 'Регистрация' }, + { path: '/sessions', element: , label: 'Сеансы' }, + { path: '/orders', element: , label: 'Заказы' }, + { path: '/films/:id', element: }, + { path: '/search-same/:request', element: } + ]; + const links = routes.filter(route => route.hasOwnProperty('label')); + const rootRoute = [ + { path: '/', element: render(links), children: routes } + ]; + + function render(links) { + return ( + <> +
+ +