Fix opportunity views

This commit is contained in:
Charles Bochet
2023-09-10 19:54:53 -07:00
parent 88c6d0da2a
commit e69d4bde52
2 changed files with 7 additions and 28 deletions

View File

@ -24,8 +24,10 @@ export type BoardHeaderProps<SortField> = ComponentProps<'div'> & {
export function BoardHeader<SortField>({
onStageAdd,
onViewsChange,
onViewSubmit,
scopeContext,
...props
availableSorts,
defaultViewName,
}: BoardHeaderProps<SortField>) {
const OptionsDropdownButton = useCallback(
() => (
@ -42,36 +44,13 @@ export function BoardHeader<SortField>({
return (
<RecoilScope SpecificContext={DropdownRecoilScopeContext}>
<ViewBar
{...props}
availableSorts={availableSorts}
defaultViewName={defaultViewName}
onViewsChange={onViewsChange}
onViewSubmit={onViewSubmit}
optionsDropdownKey={BoardOptionsDropdownKey}
OptionsDropdownButton={OptionsDropdownButton}
scopeContext={scopeContext}
displayBottomBorder={false}
leftComponent={
<>
<StyledIcon>{viewIcon}</StyledIcon>
{viewName}
</>
}
rightComponent={
<>
<FilterDropdownButton
context={context}
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
<SortDropdownButton<SortField>
context={context}
availableSorts={availableSorts || []}
hotkeyScope={FiltersHotkeyScope.FilterDropdownButton}
/>
<BoardOptionsDropdown
customHotkeyScope={{ scope: BoardOptionsHotkeyScope.Dropdown }}
onStageAdd={onStageAdd}
/>
</>
}
bottomComponent={<ViewBarDetails context={context} />}
/>
</RecoilScope>
);

View File

@ -8,7 +8,7 @@ import { GET_PIPELINE_PROGRESS } from '@/pipeline/graphql/queries/getPipelinePro
import { PageHotkeyScope } from '@/types/PageHotkeyScope';
import {
BoardHeader,
type BoardHeaderProps,
BoardHeaderProps,
} from '@/ui/board/components/BoardHeader';
import { StyledBoard } from '@/ui/board/components/StyledBoard';
import { BoardColumnIdContext } from '@/ui/board/contexts/BoardColumnIdContext';