Skip to content

Commit 34c31b2

Browse files
committed
frontend: prefer absolute links
It is safer to just use absolute links starting from the root level.
1 parent 2617df8 commit 34c31b2

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

frontends/web/src/routes/bitsurance/bitsurance.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export const Bitsurance = ({ accounts }: TProps) => {
4747

4848
useEffect(() => {
4949
if (accounts.some(({ bitsuranceStatus }) => bitsuranceStatus)) {
50-
navigate('bitsurance/dashboard');
50+
navigate('/bitsurance/dashboard');
5151
} else {
5252
setRedirecting(false);
5353
}
@@ -70,7 +70,7 @@ export const Bitsurance = ({ accounts }: TProps) => {
7070
setScanDone(true);
7171
setScanLoading(false);
7272
if (insured.length && redirectToDashboard) {
73-
navigate('bitsurance/dashboard');
73+
navigate('/bitsurance/dashboard');
7474
}
7575
};
7676

@@ -87,7 +87,7 @@ export const Bitsurance = ({ accounts }: TProps) => {
8787
// we force a detection to verify if there is any new insured account
8888
// before proceeding to the next step.
8989
await detect(false);
90-
navigate('bitsurance/account');
90+
navigate('/bitsurance/account');
9191
};
9292

9393
if (redirecting) {

frontends/web/src/routes/bitsurance/dashboard.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ export const BitsuranceDashboard = ({ accounts }: TProps) => {
133133
<Button
134134
className={style.button}
135135
primary
136-
onClick={() => navigate('bitsurance/account')}
136+
onClick={() => navigate('/bitsurance/account')}
137137
title={t('account.exportTransactions')}>
138138
<span>+</span>
139139
{t('bitsurance.dashboard.button')}

frontends/web/src/routes/bitsurance/widget.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const BitsuranceWidget = ({ code }: TProps) => {
152152
try {
153153
let message = JSON.parse(m.data);
154154
if (message?.type === 'showInsuranceDashboard') {
155-
navigate('bitsurance/dashboard');
155+
navigate('/bitsurance/dashboard');
156156
return;
157157
}
158158

0 commit comments

Comments
 (0)