fix: boards rerender optimization

This commit is contained in:
2025-08-21 16:45:04 +04:00
parent f3df8840df
commit cb67c913ad
9 changed files with 51 additions and 83 deletions

View File

@ -1,12 +1,6 @@
"use client";
import React, {
createContext,
FC,
useContext,
useEffect,
useState,
} from "react";
import React, { createContext, FC, useContext, useState } from "react";
import { useMutation, UseMutationResult } from "@tanstack/react-query";
import { AxiosError } from "axios";
import { useBoardsContext } from "@/app/deals/contexts/BoardsContext";
@ -55,10 +49,6 @@ const useStatusesContextState = () => {
const [isEditorDrawerOpened, setIsEditorDrawerOpened] =
useState<boolean>(false);
useEffect(() => {
refetchStatuses();
}, [selectedBoard]);
const updateStatus = useMutation({
...updateStatusMutation(),
onError: error => {