Skip to content

Commit ee10a1f

Browse files
committed
fix: implement hard refresh when navigating back to the homepage from the error page
1 parent 6d8af4f commit ee10a1f

File tree

3 files changed

+21
-6
lines changed

3 files changed

+21
-6
lines changed

src/App/PageError/index.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { useRouteError } from 'react-router-dom';
33

44
import useBooleanState from '#hooks/useBooleanState';
55
import Button from '#components/Button';
6-
import Link from '#components/Link';
76

87
import styles from './styles.module.css';
98

@@ -63,13 +62,13 @@ function PageError() {
6362
)}
6463
</div>
6564
<div className={styles.footer}>
66-
<Link
67-
to="home"
68-
variant="primary"
65+
<a
66+
className={styles.homeLink}
67+
href="/"
6968
>
7069
{/* FIXME: use translations */}
7170
Go back to homepage
72-
</Link>
71+
</a>
7372
</div>
7473
</div>
7574
</div>

src/App/PageError/styles.module.css

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,22 @@
4343
display: flex;
4444
align-items: center;
4545
justify-content: flex-end;
46+
47+
.home-link {
48+
display: inline-flex;
49+
align-items: center;
50+
transition: var(--go-ui-duration-transition-medium) background-color ease-in-out;
51+
border-radius: var(--go-ui-border-radius-full);
52+
background-color: var(--go-ui-color-primary-red);
53+
padding: var(--go-ui-spacing-4xs) var(--go-ui-spacing-sm);
54+
text-decoration: none;
55+
color: var(--go-ui-color-white);
56+
57+
&:hover {
58+
background-color: var(--go-ui-color-red-hover);
59+
text-decoration: underline;
60+
}
61+
}
4662
}
4763
}
4864
}

vite.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default defineConfig(({ mode }) => {
3434
svgr(),
3535
reactSwc(),
3636
tsconfigPaths(),
37-
webfontDownload(),
37+
// webfontDownload(),
3838
validateEnv(envConfig),
3939
isProd ? compression() : undefined,
4040
isProd ? visualizer({ sourcemap: true }) : undefined,

0 commit comments

Comments
 (0)