Skip to content

Commit

Permalink
Fixed context for mainnet button (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
swarna1101 authored May 29, 2024
1 parent 965ff31 commit c928e9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/widgets/07-ecosystem-screens/provider/context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export interface IEcosystemFilters {
export interface IEcosystemContext {
filters: IEcosystemFilters;
setFilter: <T extends keyof IEcosystemFilters>(
key: T,
key: T,
value: IEcosystemFilters[T]
) => void;
}
Expand All @@ -35,16 +35,16 @@ export const EcosystemFilters: React.FC<Props> = ({ children }) => {
const [state, setState] = useState<IEcosystemFilters>({
search: '',
category: null,
type: null
type: 'Mainnet' // Set the initial type to 'Mainnet'
});

const setFilter = <T extends keyof IEcosystemFilters>(
key: T,
key: T,
value: IEcosystemFilters[T]
) => {
setState({ ...state, [key]: value });
}

return (
<EcosystemContext.Provider value={{ filters: state, setFilter }}>
{children}
Expand Down

0 comments on commit c928e9d

Please sign in to comment.