From 33af5871677cb065426133afe86b497ff0d38df2 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Tue, 2 Feb 2021 16:50:32 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Add=20SelectSkin=20and=20useSubtitl?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.js | 41 ++++++++++++++++++++++-------- src/components/Page.js | 24 ----------------- src/components/SelectSkin.js | 14 ++++++++++ src/contexts/ContextSetSubtitle.js | 9 +++++++ src/hooks/useSubtitle.js | 11 ++++++++ src/routes/Error404.js | 26 ++++++++----------- src/routes/Gestinfo/index.js | 10 ++++---- src/routes/Home.js | 40 ++++++++++++++++++----------- 8 files changed, 106 insertions(+), 69 deletions(-) delete mode 100644 src/components/Page.js create mode 100644 src/components/SelectSkin.js create mode 100644 src/contexts/ContextSetSubtitle.js create mode 100644 src/hooks/useSubtitle.js diff --git a/src/App.js b/src/App.js index d32c6c1..59769dd 100644 --- a/src/App.js +++ b/src/App.js @@ -1,22 +1,43 @@ -import React, {useState} from "react"; -import {Bluelib} from "bluelib/lib/components"; -import {Router} from "@reach/router"; +import React, {Fragment, useState} from "react"; +import {BaseLink, Bluelib, Main} from "bluelib/lib/components"; +import {Router, } from "@reach/router"; import Home from "./routes/Home"; import Error404 from "./routes/Error404"; import Gestinfo from "./routes/Gestinfo"; import style from "./App.module.css"; +import MainTitle from "./components/MainTitle"; +import ContextSetSubtitle from "./contexts/ContextSetSubtitle"; +import Footer from "./components/Footer"; + export default function App() { const [skin, setSkin] = useState("rygblue"); + const [subtitle, setSubtitle] = useState(null); return ( - - - - - - - + + + + + + + + +
+ + + + + +
+ + +