Skip to content

Commit

Permalink
fix(bridge-ui): URL change won't update activeTab (#13485)
Browse files Browse the repository at this point in the history
Co-authored-by: jeff <[email protected]>
Co-authored-by: Francisco Ramos <[email protected]>
Co-authored-by: shadab-taiko <[email protected]>
  • Loading branch information
4 people authored Mar 31, 2023
1 parent a3e38fa commit 884e782
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/bridge-ui/src/components/Tabs/Tabs.svelte
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
<script lang="ts" context="module">
import { getContext } from 'svelte';
import type { Writable } from 'svelte/store';
export const key = Symbol();
</script>

Expand All @@ -10,6 +13,8 @@
// State only available to the component and its descendants
setContext(key, writable(activeTab));
const currentActiveTab = getContext<Writable<string>>(key);
$: $currentActiveTab = activeTab;
</script>

<div class={$$restProps.class} style={$$restProps.style}>
Expand Down

0 comments on commit 884e782

Please sign in to comment.