Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* chore: remove parent router * chore: re-organize router core module * chore: adapt mobile to new structure * chore: mobile: move wallet context to dashboard and routes to views * chore: update view and route components organization * chore: cleanup router events * chore: refactor core router module * empty Co-authored-by: Begoña Alvarez <balvarez@boxfish.studio>
- Loading branch information
1 parent
73704a9
commit ce0187c
Showing
148 changed files
with
339 additions
and
404 deletions.
There are no files selected for viewing
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
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
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
7 changes: 7 additions & 0 deletions
7
packages/mobile/lib/contexts/dashboard/constants/dashboard-tab-component.constant.ts
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { ActivityTab, TokensTab } from '../../../../views/dashboard/tabs' | ||
import { DashboardTab } from '../enums' | ||
|
||
export const DASHBOARD_TAB_COMPONENT = { | ||
[DashboardTab.Tokens]: TokensTab, | ||
[DashboardTab.Activity]: ActivityTab, | ||
} |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from './dashboard-tab-component.constant' | ||
export * from './initial-active-dashboard-tab.constant' |
14 changes: 14 additions & 0 deletions
14
packages/mobile/lib/contexts/dashboard/constants/initial-active-dashboard-tab.constant.ts
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { DashboardTab } from '../enums' | ||
import features from '../../../../features/features' | ||
|
||
export const INITIAL_ACTIVE_DASHBOARD_TAB: DashboardTab | null = getInitialActiveDashboardTab() | ||
|
||
function getInitialActiveDashboardTab(): DashboardTab | null { | ||
if (features?.dashboard?.tokens?.enabled) { | ||
return DashboardTab.Tokens | ||
} else if (features?.dashboard?.activity?.enabled) { | ||
return DashboardTab.Activity | ||
} else { | ||
return null | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
.../contexts/wallet/enums/wallet-tab.enum.ts → ...xts/dashboard/enums/dashboard-tab.enum.ts
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,4 +1,4 @@ | ||
export enum WalletTab { | ||
export enum DashboardTab { | ||
Activity = 'activity', | ||
Tokens = 'tokens', | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './dashboard-tab.enum' |
File renamed without changes.
10 changes: 10 additions & 0 deletions
10
packages/mobile/lib/contexts/dashboard/stores/active-dashboard-tab.store.ts
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import { writable } from 'svelte/store' | ||
|
||
import { INITIAL_ACTIVE_DASHBOARD_TAB } from '../constants' | ||
import { DashboardTab } from '../enums' | ||
|
||
export const activeDashboardTab = writable<DashboardTab>(INITIAL_ACTIVE_DASHBOARD_TAB) | ||
|
||
export function updateActiveDashboardTab(tab: DashboardTab): void { | ||
activeDashboardTab?.set(tab) | ||
} |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './active-dashboard-tab.store' |
This file was deleted.
Oops, something went wrong.
14 changes: 0 additions & 14 deletions
14
packages/mobile/lib/contexts/wallet/constants/initial-active-tab.constant.ts
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
packages/mobile/lib/contexts/wallet/constants/wallet-tab-component.constant.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
packages/mobile/lib/contexts/wallet/stores/active-wallet-tab.store.ts
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
3 changes: 2 additions & 1 deletion
3
...obile/lib/core/router/dashboard-router.ts → ...es/mobile/lib/routers/dashboard-router.ts
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 5 additions & 2 deletions
7
...bile/lib/core/router/onboarding-router.ts → ...s/mobile/lib/routers/onboarding-router.ts
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
File renamed without changes.
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
3 changes: 2 additions & 1 deletion
3
...subrouters/onboarding/app-setup-router.ts → ...subrouters/onboarding/app-setup-router.ts
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
File renamed without changes.
Oops, something went wrong.