Skip to content

Commit cd0203a

Browse files
committed
[DEV-19082] Fixed page refresh function
1 parent 7524ef5 commit cd0203a

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

app/[localeCode]/error.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ import '@/styles/styles.globals.scss';
99

1010
import styles from './error.module.scss';
1111

12-
export default function Error({ reset }: { reset: () => void }) {
12+
export default function Error() {
13+
function handlePageRefresh() {
14+
window.location.reload();
15+
}
16+
1317
return (
1418
<div className={styles.container}>
1519
<div className={styles.wrapper}>
@@ -20,7 +24,7 @@ export default function Error({ reset }: { reset: () => void }) {
2024
<h1 className={styles.title}>We’re sorry, this newsroom couldn’t load</h1>
2125
<p className={styles.description}>
2226
Try to{' '}
23-
<button className={styles.link} onClick={reset}>
27+
<button className={styles.link} onClick={handlePageRefresh}>
2428
refresh
2529
</button>{' '}
2630
the page, or visit the platform’s{' '}

0 commit comments

Comments
 (0)