-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Majorfi
committed
Oct 16, 2023
1 parent
ac09b2d
commit 33da362
Showing
6 changed files
with
33 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,9 @@ import {useSessionStorage} from '@yearn-finance/web-lib/hooks/useSessionStorage' | |
|
||
import type {ReactElement} from 'react'; | ||
|
||
export const ALL_CATEGORIES = '["Holdings","Crypto Vaults","Stables Vaults","Curve Vaults","Balancer Vaults","Boosted Vaults","Velodrome Vaults","Aerodrome Vaults"]'; | ||
export const ALL_CHAINS = '[1,10,250,8453,42161]'; | ||
|
||
export type TAppSettingsContext = { | ||
category: string; | ||
selectedChains: string; | ||
|
@@ -31,14 +34,11 @@ const defaultProps: TAppSettingsContext = { | |
|
||
const AppSettingsContext = createContext<TAppSettingsContext>(defaultProps); | ||
export const AppSettingsContextApp = memo(function AppSettingsContextApp({children}: {children: ReactElement}): ReactElement { | ||
const [category, set_category] = useSessionStorage( | ||
'yearn.fi/vaults-categories', | ||
'["Holdings","Crypto Vaults","Stables Vaults","Curve Vaults","Balancer Vaults","Boosted Vaults","Velodrome Vaults","Aerodrome Vaults"]' | ||
); | ||
const [searchValue, set_searchValue] = useSessionStorage('yearn.fi/vaults-search', ''); | ||
const [selectedChains, set_selectedChains] = useSessionStorage('yearn.fi/selected-chains', '[1,10,250,8453,42161]'); | ||
const [shouldHideDust, set_shouldHideDust] = useLocalStorage('yearn.fi/should-hide-dust', false); | ||
const [shouldHideLowTVLVaults, set_shouldHideLowTVLVaults] = useLocalStorage('yearn.fi/hide-low-tvl', false); | ||
const [category, set_category] = useSessionStorage('yearn.fi/[email protected]', ALL_CATEGORIES); | ||
const [searchValue, set_searchValue] = useSessionStorage('yearn.fi/[email protected]', ''); | ||
const [selectedChains, set_selectedChains] = useSessionStorage('yearn.fi/[email protected]', ALL_CHAINS); | ||
const [shouldHideDust, set_shouldHideDust] = useLocalStorage('yearn.fi/[email protected]', false); | ||
const [shouldHideLowTVLVaults, set_shouldHideLowTVLVaults] = useLocalStorage('yearn.fi/[email protected]', false); | ||
|
||
/* 🔵 - Yearn Finance ****************************************************** | ||
** Setup and render the Context provider to use in the app. | ||
|
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