feat(statsPage): click on logo to go to main app

* Also added menu item to access stats page
parent 2bc154d1
......@@ -10,9 +10,6 @@ const useStyle = makeStyles((theme) => ({
position: "relative",
width: "fit-content",
},
centered: {
margin: "0 auto",
},
innerLogoContainer: {
display: "flex",
alignItems: "center",
......@@ -71,7 +68,7 @@ function Core() {
function Logo({ linkTo }) {
const classes = useStyle();
return (
<div className={classNames(classes.logoContainer, classes.centered)}>
<div className={classNames(classes.logoContainer)}>
{linkTo ? (
<CustomNavLink to={linkTo}>
<Core />
......
......@@ -31,6 +31,7 @@ export const infoMenuItems = [
item("Le projet REX-DRI", APP_ROUTES.aboutProject, null),
item("Conditions d'utilisations", APP_ROUTES.aboutCgu, null),
item("Information RGPD", APP_ROUTES.aboutRgpd, null),
item("Statistiques du site", APP_ROUTES.stats, null, true),
];
export const settingsMenuItems = [
......
......@@ -32,6 +32,7 @@ const aboutRgpd = `${about}rgpd/`;
const aboutCgu = `${about}cgu/`;
const aboutUnlinkedPartners = `${about}unlinked-partners/`;
const logout = "/user/logout";
const stats = "/stats";
const APP_ROUTES = {
base,
......@@ -62,6 +63,7 @@ const APP_ROUTES = {
aboutCgu,
aboutRgpd,
aboutUnlinkedPartners,
stats,
logout,
};
......
......@@ -14,8 +14,21 @@ function SubEntry() {
const classesNotistack = useStylesNotiStack();
const toolbarContent = (
<div style={{ flex: 1 }}>
<Logo />
<div
style={{
margin: "0 auto",
}}
>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}
<div
style={{ width: "fit-content" }}
onClick={() => {
window.history.pushState(null, null, "/app");
window.location.reload();
}}
>
<Logo />
</div>
</div>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment