mirror of
https://github.com/twentyhq/twenty.git
synced 2024-11-25 20:00:34 +03:00
Fix
This commit is contained in:
parent
016533b525
commit
a4ac735590
@ -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');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user