Skip to content

Commit

Permalink
Fix problem with changing area. #11
Browse files Browse the repository at this point in the history
  • Loading branch information
dabreegster committed Aug 18, 2024
1 parent 907435e commit 01cde6b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions web/src/NavBar.svelte
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
<script lang="ts">
import { mode, routeMode } from "./stores";
function titleMode() {
let url = new URL(window.location.href);
url.searchParams.delete("study_area");
window.history.replaceState(null, "", url.toString());
$mode = { kind: "title" };
}
</script>

<nav>
<ul>
<li>
<button on:click={() => ($mode = { kind: "title" })}
>Change study area</button
>
<button on:click={titleMode}>Change study area</button>
</li>

<li>
Expand Down

0 comments on commit 01cde6b

Please sign in to comment.