Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add back to homepage button #12

Merged
merged 1 commit into from
Jul 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions packages/app/src/report/components/ReportHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
import {
Divider,
IconButton,
Paper,
Theme,
Tooltip,
Typography,
useMediaQuery,
useTheme,
} from "@mui/material";
import { FC } from "react";
import { IoMdArrowBack } from "react-icons/io";
import { NavLink } from "react-router-dom";
import { makeStyles } from "tss-react/mui";
import { LanguageIcon } from "../../common/LanguageIcon";
import { useReportStore } from "../stores/fe-report-store";
Expand Down Expand Up @@ -68,6 +73,16 @@ export const ReportHeader: FC<ReportBannerProps> = ({ ready }) => {
/>
<LanguageIcon language={language} />
</div>
<Divider orientation="horizontal" sx={{ marginBlockStart: 2 }} />
<div className={classes.footer}>
<Tooltip arrow title="Back to homepage" placement="top">
<NavLink to="/">
<IconButton size="small">
<IoMdArrowBack />
</IconButton>
</NavLink>
</Tooltip>
</div>
</div>
<Score
className={classes.score}
Expand Down Expand Up @@ -138,6 +153,9 @@ const useStyles = makeStyles()((theme: Theme) => ({
nowrap: {
wordBreak: "keep-all",
},
footer: {
paddingBlock: theme.spacing(1),
},
}));

interface ReportBannerProps {
Expand Down