feat: refactor loadBoard and loadComments to use useCallback for performance optimization

This commit is contained in:
Abhimanyu Saharan
2026-02-06 19:17:37 +05:30
parent 6c14af0451
commit d5487b7ee2
2 changed files with 20 additions and 17 deletions

View File

@@ -1,6 +1,6 @@
"use client";
import { useMemo, useState } from "react";
import { memo, useMemo, useState } from "react";
import { TaskCard } from "@/components/molecules/TaskCard";
import { cn } from "@/lib/utils";
@@ -77,7 +77,7 @@ const formatDueDate = (value?: string | null) => {
});
};
export function TaskBoard({
export const TaskBoard = memo(function TaskBoard({
tasks,
onTaskSelect,
onTaskMove,
@@ -204,4 +204,6 @@ export function TaskBoard({
})}
</div>
);
}
});
TaskBoard.displayName = "TaskBoard";