This commit is contained in:
Lucas Bordeau 2024-10-31 15:30:28 +01:00
parent 016533b525
commit a4ac735590

View File

@ -18,9 +18,7 @@ export type ContextProviderName =
| 'releases' | 'releases'
| 'test' | 'test'
| 'showPageActivityContainer' | 'showPageActivityContainer'
| 'navigationDrawer' | 'navigationDrawer';
| 'filterSelectDropdown'
| 'sortSelectDropdown';
const createScrollWrapperContext = (id: string) => const createScrollWrapperContext = (id: string) =>
createContext<ScrollWrapperContextValue>({ createContext<ScrollWrapperContextValue>({
@ -53,10 +51,6 @@ export const ShowPageActivityContainerScrollWrapperContext =
export const NavigationDrawerScrollWrapperContext = export const NavigationDrawerScrollWrapperContext =
createScrollWrapperContext('navigationDrawer'); createScrollWrapperContext('navigationDrawer');
export const TestScrollWrapperContext = createScrollWrapperContext('test'); export const TestScrollWrapperContext = createScrollWrapperContext('test');
export const FilterSelectDropdownScrollWrapperContext =
createScrollWrapperContext('filterSelectDropdown');
export const SortSelectDropdownScrollWrapperContext =
createScrollWrapperContext('sortSelectDropdown');
export const getContextByProviderName = ( export const getContextByProviderName = (
contextProviderName: ContextProviderName, contextProviderName: ContextProviderName,
@ -88,10 +82,6 @@ export const getContextByProviderName = (
return ShowPageActivityContainerScrollWrapperContext; return ShowPageActivityContainerScrollWrapperContext;
case 'navigationDrawer': case 'navigationDrawer':
return NavigationDrawerScrollWrapperContext; return NavigationDrawerScrollWrapperContext;
case 'filterSelectDropdown':
return FilterSelectDropdownScrollWrapperContext;
case 'sortSelectDropdown':
return SortSelectDropdownScrollWrapperContext;
default: default:
throw new Error('Context Provider not available'); throw new Error('Context Provider not available');
} }