From 2f65cd44b5079f619ab866a6c351c17b3ff1e300 Mon Sep 17 00:00:00 2001 From: Maksym Sadovnychyy Date: Fri, 20 May 2022 20:46:05 +0200 Subject: [PATCH] (feat): layout update --- clientapp/src/App.tsx | 1 + clientapp/src/layouts/admin/NavMenu/index.tsx | 2 +- clientapp/src/layouts/admin/index.tsx | 4 +- clientapp/src/layouts/public/Footer/index.tsx | 17 ++ .../src/layouts/public/NavMenu/index.tsx | 9 +- clientapp/src/layouts/public/index.tsx | 7 +- clientapp/src/pages/Blog/Catalog/index.tsx | 137 ++++++++++ clientapp/src/pages/Blog/Item/index.tsx | 133 ++++++++++ clientapp/src/pages/Blog/index.ts | 7 + clientapp/src/pages/Home.tsx | 25 -- clientapp/src/pages/Home/index.tsx | 233 ++++++++++++++++++ .../src/pages/Home/scss/style.module.scss | 19 ++ clientapp/src/pages/Shop/Catalog/index.tsx | 85 +++++++ clientapp/src/pages/Shop/Item/index.tsx | 37 +++ .../src/pages/Shop/RelatedProducts/index.tsx | 61 +++++ clientapp/src/pages/Shop/index.ts | 7 + clientapp/src/pages/index.tsx | 9 + clientapp/src/store/reducers/Settings.ts | 62 ++++- 18 files changed, 817 insertions(+), 38 deletions(-) create mode 100644 clientapp/src/layouts/public/Footer/index.tsx create mode 100644 clientapp/src/pages/Blog/Catalog/index.tsx create mode 100644 clientapp/src/pages/Blog/Item/index.tsx create mode 100644 clientapp/src/pages/Blog/index.ts delete mode 100644 clientapp/src/pages/Home.tsx create mode 100644 clientapp/src/pages/Home/index.tsx create mode 100644 clientapp/src/pages/Home/scss/style.module.scss create mode 100644 clientapp/src/pages/Shop/Catalog/index.tsx create mode 100644 clientapp/src/pages/Shop/Item/index.tsx create mode 100644 clientapp/src/pages/Shop/RelatedProducts/index.tsx create mode 100644 clientapp/src/pages/Shop/index.ts diff --git a/clientapp/src/App.tsx b/clientapp/src/App.tsx index b2337c2..f4b9561 100644 --- a/clientapp/src/App.tsx +++ b/clientapp/src/App.tsx @@ -9,6 +9,7 @@ import { actionCreators as settingsActionCreators } from './store/reducers/Setti import { DynamicLayout } from './layouts' import { DynamicPage } from './pages' import { IReduxState, IRoute } from './interfaces' + interface IRouteProp { path: string, element?: JSX.Element diff --git a/clientapp/src/layouts/admin/NavMenu/index.tsx b/clientapp/src/layouts/admin/NavMenu/index.tsx index 9073543..73161b3 100644 --- a/clientapp/src/layouts/admin/NavMenu/index.tsx +++ b/clientapp/src/layouts/admin/NavMenu/index.tsx @@ -25,7 +25,7 @@ const NavMenu : FC = (props: INavMenu) => { } return
- + diff --git a/clientapp/src/layouts/admin/index.tsx b/clientapp/src/layouts/admin/index.tsx index 59c5c78..1d11ef5 100644 --- a/clientapp/src/layouts/admin/index.tsx +++ b/clientapp/src/layouts/admin/index.tsx @@ -20,9 +20,9 @@ const AdminLayout: FC = ({ children = null }) => {
- +
{children} - +
} diff --git a/clientapp/src/layouts/public/Footer/index.tsx b/clientapp/src/layouts/public/Footer/index.tsx new file mode 100644 index 0000000..b39422e --- /dev/null +++ b/clientapp/src/layouts/public/Footer/index.tsx @@ -0,0 +1,17 @@ +import React from 'react' +import { useSelector } from 'react-redux' +import { Container } from 'reactstrap' +import { IReduxState } from '../../../interfaces' + +const Footer = () => { + let { siteName } = useSelector((state: IReduxState) => state.settings) + + return
+

Copyright © {siteName} {(new Date).getFullYear()}

+
+ +} + +export { + Footer +} \ No newline at end of file diff --git a/clientapp/src/layouts/public/NavMenu/index.tsx b/clientapp/src/layouts/public/NavMenu/index.tsx index 6c52d0d..576830f 100644 --- a/clientapp/src/layouts/public/NavMenu/index.tsx +++ b/clientapp/src/layouts/public/NavMenu/index.tsx @@ -19,7 +19,7 @@ const NavMenu : FC = () => { } return
- + {siteName} @@ -34,6 +34,13 @@ const NavMenu : FC = () => { })} + +
+ +
} diff --git a/clientapp/src/layouts/public/index.tsx b/clientapp/src/layouts/public/index.tsx index a17ba63..523636d 100644 --- a/clientapp/src/layouts/public/index.tsx +++ b/clientapp/src/layouts/public/index.tsx @@ -1,7 +1,7 @@ import React, { FC } from 'react' import { Container } from 'reactstrap' import { NavMenu } from './NavMenu' - +import { Footer } from './Footer' import { ILayout } from '../interfaces' import s from './scss/style.module.scss' @@ -10,10 +10,11 @@ const PublicLayout: FC = ({ children = null }) => { return <>
- +
{children} - +
+