fix: hidden creating statuses when board is not selected
This commit is contained in:
@ -6,6 +6,7 @@ import CreateStatusButton from "@/app/deals/components/shared/CreateStatusButton
|
||||
import DealCard from "@/app/deals/components/shared/DealCard/DealCard";
|
||||
import DealContainer from "@/app/deals/components/shared/DealContainer/DealContainer";
|
||||
import StatusColumnWrapper from "@/app/deals/components/shared/StatusColumnWrapper/StatusColumnWrapper";
|
||||
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
|
||||
import { useDealsContext } from "@/app/deals/contexts/DealsContext";
|
||||
import useDealsAndStatusesDnd from "@/app/deals/hooks/useDealsAndStatusesDnd";
|
||||
import FunnelDnd from "@/components/dnd/FunnelDnd/FunnelDnd";
|
||||
@ -14,6 +15,7 @@ import { DealSchema, StatusSchema } from "@/lib/client";
|
||||
import { sortByLexorank } from "@/utils/lexorank";
|
||||
|
||||
const Funnel: FC = () => {
|
||||
const { selectedBoard } = useBoardsContext();
|
||||
const { deals } = useDealsContext();
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
@ -66,6 +68,7 @@ const Funnel: FC = () => {
|
||||
</StatusColumnWrapper>
|
||||
)}
|
||||
disabledColumns={isMobile}
|
||||
isCreatingContainerEnabled={!!selectedBoard}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -80,7 +83,7 @@ const Funnel: FC = () => {
|
||||
wrap={"nowrap"}
|
||||
gap={"xs"}>
|
||||
{renderFunnelDnd()}
|
||||
<CreateStatusButton />
|
||||
{selectedBoard && <CreateStatusButton />}
|
||||
</Group>
|
||||
</ScrollArea>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user