Add links to policies

Show links to terms of service and privacy policy on settings page
This commit is contained in:
2021-09-12 11:21:27 +01:00
parent 7f5ae50e22
commit 7eb9070014
2 changed files with 13 additions and 5 deletions

View File

@@ -1,9 +1,17 @@
import React from 'react';
import React from "react";
import { Link } from "react-router-dom";
export default function Footer() {
export default function Footer(props) {
return (
<footer>
&copy; Matthew Grove {new Date().getFullYear()}
<span>&copy; Matthew Grove {new Date().getFullYear()}</span>
{
props.showTerms &&
<>
<Link to="/tos">Terms of service</Link>
<Link to="/privacy">Privacy policy</Link>
</>
}
</footer>
)
}

View File

@@ -2,7 +2,7 @@ import React, { Component } from 'react';
import { HomeRounded as HomeRoundedIcon } from "@material-ui/icons";
import NavBar from "./NavBar";
import Button from "./Button";
import { withRouter } from "react-router-dom";
import { withRouter, Link } from "react-router-dom";
import SettingsContent from "./SettingsContent";
import Footer from "./Footer";
@@ -90,7 +90,7 @@ export default withRouter(class Settings extends Component {
</Button>
</div>
</main>
<Footer />
<Footer showTerms={true} />
</div>
)
}