add cookie consent

fix #15
This commit is contained in:
Mario
2020-10-29 11:09:50 +01:00
parent b07d753e6c
commit fd1d8c35e5
4 changed files with 48 additions and 7 deletions
+2
View File
@@ -13,6 +13,7 @@ import { ThemeProvider, createMuiTheme } from '@material-ui/core/styles';
import Navbar from './components/Navbar';
import Footer from './components/Footer';
import Routes from './components/Routes';
import Cookies from './components/Cookies';
const theme = createMuiTheme({
palette: {
@@ -37,6 +38,7 @@ function App() {
<div className="wrapper">
<Navbar />
<Routes />
<Cookies />
<Footer />
</div>
</Router>
+25
View File
@@ -0,0 +1,25 @@
import CookieConsent from "react-cookie-consent";
import React, { Component } from 'react';
class Cookies extends Component {
render() {
return (
<CookieConsent
location="bottom"
buttonText="Okay!!"
cookieName="cookieConsent"
style={{ background: "#2B373B" }}
buttonStyle={{ background: "white", color: "#4EAF47", fontSize: "1rem" }}
expires={150}
>
This website uses cookies to enhance the user experience.{" "}
</CookieConsent>
);
};
}
export default Cookies;