summaryrefslogtreecommitdiffstats
path: root/src/components
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-13 12:06:06 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-13 12:06:06 +0100
commit4cae14b9f86609b8c1f74d97a033e7091af49cb4 (patch)
treef5e81bde47b47947901a00307a47c36e3fc38ffd /src/components
parent45335042c91c6bf5aa736658c461d54f96a6e0f2 (diff)
chore: change app to use a layout
I can now insert header/footer on each pages.
Diffstat (limited to 'src/components')
-rw-r--r--src/components/Footer/Footer.tsx11
-rw-r--r--src/components/Header/Header.tsx11
-rw-r--r--src/components/Layouts/Layout.tsx16
-rw-r--r--src/components/Main/Main.tsx7
4 files changed, 45 insertions, 0 deletions
diff --git a/src/components/Footer/Footer.tsx b/src/components/Footer/Footer.tsx
new file mode 100644
index 0000000..d92fb72
--- /dev/null
+++ b/src/components/Footer/Footer.tsx
@@ -0,0 +1,11 @@
+import Copyright from '@components/Copyright/Copyright';
+
+const Footer = () => {
+ return (
+ <footer>
+ <Copyright />
+ </footer>
+ );
+};
+
+export default Footer;
diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx
new file mode 100644
index 0000000..599fdc0
--- /dev/null
+++ b/src/components/Header/Header.tsx
@@ -0,0 +1,11 @@
+import Branding from '@components/Branding/Branding';
+
+const Header = () => {
+ return (
+ <header>
+ <Branding />
+ </header>
+ );
+};
+
+export default Header;
diff --git a/src/components/Layouts/Layout.tsx b/src/components/Layouts/Layout.tsx
new file mode 100644
index 0000000..4270a17
--- /dev/null
+++ b/src/components/Layouts/Layout.tsx
@@ -0,0 +1,16 @@
+import { FunctionComponent } from 'react';
+import Footer from '@components/Footer/Footer';
+import Header from '@components/Header/Header';
+import Main from '@components/Main/Main';
+
+const Layout: FunctionComponent = ({ children }) => {
+ return (
+ <>
+ <Header />
+ <Main>{children}</Main>
+ <Footer />
+ </>
+ );
+};
+
+export default Layout;
diff --git a/src/components/Main/Main.tsx b/src/components/Main/Main.tsx
new file mode 100644
index 0000000..3705c83
--- /dev/null
+++ b/src/components/Main/Main.tsx
@@ -0,0 +1,7 @@
+import { FunctionComponent } from 'react';
+
+const Main: FunctionComponent = ({ children }) => {
+ return <main>{children}</main>;
+};
+
+export default Main;