diff --git a/src/components/App.tsx b/src/components/App.tsx index 28a66a1..1716cd2 100644 --- a/src/components/App.tsx +++ b/src/components/App.tsx @@ -1,45 +1,57 @@ -import React from 'react'; +import React from 'react'; import classNames from 'classnames'; import Header from './Header/Header'; import Footer from './Footer/Footer'; import Router from './Router'; import {BrowserRouter, Switch, Route, Redirect, useParams, useLocation} from 'react-router-dom'; -import { Item } from '../model'; +import {Item} from '../model'; const useQuery = () => { - return new URLSearchParams(useLocation().search); + return new URLSearchParams(useLocation().search); } -const RouterWithPageParam = ({items, releases}: {items: Item[], releases: string[]}) => { - const { page } = useParams(); - const query = useQuery(); +const RouterWithPageParam = ({items, releases}: { items: Item[], releases: string[] }) => { + const {page} = useParams(); + const query = useQuery(); - return ; + return ; }; -export default function App({items, releases}: {items: Item[], releases: string[]}) { - return ( - -
-
-
-
-
-
+const HeaderWithPageParam = () => { + const {page} = useParams(); + + return
+}; + +const FooterWithPageParam = ({items}: { items: Item[]}) => { + const {page} = useParams(); + + return
+}; + +export default function App({items, releases}: { items: Item[], releases: string[] }) { + return ( + - - - - - - + +
+
+
+ +
+
+ +
+
+ +
+
+
+
+ + +
-
-
-
-
-
-
- ); + + ); }