From de63b5e778d6533e088da64f37c3a2600f7a69cf Mon Sep 17 00:00:00 2001 From: Roman Timashev Date: Tue, 18 Feb 2020 12:29:21 +0300 Subject: [PATCH] App.Header refactoring --- src/components/App/Header.tsx | 26 ++++++++++++++++++++------ src/components/App/index.tsx | 18 +++++++----------- src/style/components/navigation.scss | 10 ---------- src/style/style.scss | 1 - 4 files changed, 27 insertions(+), 28 deletions(-) delete mode 100644 src/style/components/navigation.scss diff --git a/src/components/App/Header.tsx b/src/components/App/Header.tsx index 3dc82dc7..db9ce493 100644 --- a/src/components/App/Header.tsx +++ b/src/components/App/Header.tsx @@ -1,8 +1,22 @@ -import * as React from 'react' -import { Navigation } from '../Navigation' +export const Header: React.FC = props => ( +
+ + +
+
+ {props.children} +
+
+
) - -export default Header diff --git a/src/components/App/index.tsx b/src/components/App/index.tsx index 3bcf5c8b..ba10f674 100644 --- a/src/components/App/index.tsx +++ b/src/components/App/index.tsx @@ -4,8 +4,8 @@ import { Footer } from '../Footer' import Comments from '../Comments' import { useReducedMotion } from 'src/hooks/useReducedMotion' import { Wrapper } from '../Wrapper' - -const Header = dynamic(() => import('./Header'), { +import { Header } from './Header' +const Navigation = dynamic(() => import('../Navigation').then(mod => mod.Navigation), { ssr: false, }) @@ -22,15 +22,11 @@ export const App: React.FC = props => { return ( -
-
-
-
-
- +
+ +
)} footer={(