[WEB-575] chore: safely re-enable SWR (#3805)
* safley enable swr and make sure to minimalize re renders * resolve build errors * fix dropdowns updation by adding observer
This commit is contained in:
parent
bd142989b4
commit
6c70d3854a
49 changed files with 952 additions and 1173 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import React, { useMemo } from "react";
|
||||
import React, { useCallback, useMemo } from "react";
|
||||
import { observer } from "mobx-react-lite";
|
||||
import { useRouter } from "next/router";
|
||||
// mobx store
|
||||
|
|
@ -39,7 +39,7 @@ export const CycleSpreadsheetLayout: React.FC = observer(() => {
|
|||
const isCompletedCycle =
|
||||
cycleId && currentProjectCompletedCycleIds ? currentProjectCompletedCycleIds.includes(cycleId.toString()) : false;
|
||||
|
||||
const canEditIssueProperties = () => !isCompletedCycle;
|
||||
const canEditIssueProperties = useCallback(() => !isCompletedCycle, [isCompletedCycle]);
|
||||
|
||||
return (
|
||||
<BaseSpreadsheetRoot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue