Skip to content

Commit 181cbca

Browse files
kimamovrestyled-io[bot]restyled-commits
authored
fix(Faq): DOM validation fixed by setting the typography component to… (#362)
* fix(Faq): DOM validation fixed by setting the typography component to div * fix(NavigationTitle): trimes down the grid soup in navigationTitle makes only the arrow clickable and aligns it left instead of center * Restyled by prettier (#363) Co-authored-by: Restyled.io <[email protected]> Co-authored-by: restyled-io[bot] <32688539+restyled-io[bot]@users.noreply.github.com> Co-authored-by: Restyled.io <[email protected]>
1 parent 111c280 commit 181cbca

File tree

2 files changed

+12
-17
lines changed

2 files changed

+12
-17
lines changed
Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,20 @@
11
import React from "react";
2-
import { Grid, Typography } from "@material-ui/core";
2+
import { Box, Typography } from "@material-ui/core";
33
import ArrowBackIosIcon from "@material-ui/icons/ArrowBackIos";
44
import { useQueryPreservingHistoryPush } from "app-config/components/customHistoryHooks";
55

66
export const NavigationTitle: React.FC<{ title: string; backToExpandedFeatureInfo?: boolean }> = (props) => {
77
const customHistoryPush = useQueryPreservingHistoryPush();
88

99
return (
10-
<a
11-
onClick={() => customHistoryPush("/", { expanded: props.backToExpandedFeatureInfo ? "true" : undefined })}
12-
style={{ textDecoration: "none", cursor: "pointer" }}
13-
aria-label="go back to map"
14-
>
15-
<Grid container direction="row" alignItems="center" style={{ marginTop: "8px" }}>
16-
<Grid item xs={1}>
17-
<ArrowBackIosIcon color="action" />
18-
</Grid>
19-
<Grid item xs={11}>
20-
<Typography variant="h1">{props.title}</Typography>
21-
</Grid>
22-
</Grid>
23-
</a>
10+
<Box display="flex" flex={1} alignItems="center" style={{ marginTop: "8px", width: "100%" }}>
11+
<ArrowBackIosIcon
12+
style={{ textDecoration: "none", cursor: "pointer", padding: "8px" }}
13+
aria-label="go back to map"
14+
onClick={() => customHistoryPush("/", { expanded: props.backToExpandedFeatureInfo ? "true" : undefined })}
15+
color="action"
16+
/>
17+
<Typography variant="h1">{props.title}</Typography>
18+
</Box>
2419
);
2520
};

apps/official/components/pages/Faq.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export const Faq: React.FC = () => {
5656

5757
<section>
5858
<FaqAccordion title={t("faq.what-is-covmap.title")}>
59-
<Typography style={{ width: "100%" }}>
59+
<Typography style={{ width: "100%" }} component="div">
6060
<div style={{ display: "flex", flexDirection: "column" }}>
6161
<div className={classes.textBlock}>{t("faq.what-is-covmap.text")}</div>
6262
<div className={classes.textBlock}>
@@ -146,7 +146,7 @@ export const Faq: React.FC = () => {
146146
</FaqAccordion>
147147

148148
<FaqAccordion title={t("faq.advantages.title")}>
149-
<Typography style={{ width: "100%" }}>
149+
<Typography style={{ width: "100%" }} component="div">
150150
<div style={{ display: "flex", flexDirection: "column" }}>
151151
<div className={classes.textBlock}>{t("faq.advantages.text-1")}</div>
152152
<div className={classes.textBlock}>{t("faq.advantages.text-2")}</div>

0 commit comments

Comments
 (0)