Skip to content

Commit

Permalink
Merge pull request #2554 from dusk-network/fix-2553-maintenance-build
Browse files Browse the repository at this point in the history
web-wallet: Replace hook reroute
  • Loading branch information
kieranhall authored Oct 1, 2024
2 parents eac4ed5 + 3a57d2c commit 80db857
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 0 additions & 6 deletions web-wallet/src/hooks.js

This file was deleted.

3 changes: 3 additions & 0 deletions web-wallet/src/routes/(app)/+layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ import walletStore from "$lib/stores/walletStore";

/** @type {import("./$types").LayoutLoad} */
export async function load() {
if (import.meta.env.VITE_MODE_MAINTENANCE === "true") {
redirect(307, "/maintenance");
}
if (!get(walletStore).initialized) {
redirect(307, "/");
}
Expand Down
8 changes: 8 additions & 0 deletions web-wallet/src/routes/(welcome)/+layout.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { redirect } from "$lib/navigation";

/** @type {import("./$types").LayoutLoad} */
export async function load() {
if (import.meta.env.VITE_MODE_MAINTENANCE === "true") {
redirect(307, "/maintenance");
}
}

0 comments on commit 80db857

Please sign in to comment.