Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: reset Governance dashboard on wallet switch (#5737)
* fix: add account switching for proposal details view * chore: rename some components * fix: allow switching on dashboard view * chore: add explanatory comments * chore: apply changes per PR review
- Loading branch information
1 parent
b853b6a
commit c5f064a
Showing
5 changed files
with
22 additions
and
15 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
packages/desktop/views/dashboard/collectibles/Collectibles.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 7 additions & 5 deletions
12
packages/desktop/views/dashboard/governance/Governance.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,15 @@ | ||
<script lang="ts"> | ||
import { DetailsView, ProposalsView } from './views' | ||
import { selectedAccount } from '@core/account' | ||
import { GovernanceRoute, governanceRoute } from '@core/router' | ||
import { GovernanceDashboardView, ProposalDetailsView } from './views' | ||
import { selectedAccount, selectedAccountIndex } from '@core/account/stores' | ||
import { GovernanceRoute, governanceRoute, governanceRouter } from '@core/router' | ||
$: $selectedAccountIndex !== undefined && $governanceRouter.reset() | ||
</script> | ||
|
||
{#if $selectedAccount} | ||
{#if $governanceRoute === GovernanceRoute.Proposals} | ||
<ProposalsView /> | ||
<GovernanceDashboardView /> | ||
{:else if $governanceRoute === GovernanceRoute.Details} | ||
<DetailsView /> | ||
<ProposalDetailsView /> | ||
{/if} | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
export { default as DetailsView } from './DetailsView.svelte' | ||
export { default as ProposalsView } from './ProposalsView.svelte' | ||
export { default as GovernanceDashboardView } from './GovernanceDashboardView.svelte' | ||
export { default as ProposalDetailsView } from './ProposalDetailsView.svelte' |