feature/IO-3499-React-19: Remove redundant forward refs in favor of React 19 built in ref prop

This commit is contained in:
Dave
2026-01-14 00:44:15 -05:00
parent 36fd077bab
commit 7d7742a7fa
19 changed files with 77 additions and 78 deletions

View File

@@ -1,7 +1,7 @@
import { Virtuoso } from "react-virtuoso";
import { Badge, Button, Spin } from "antd";
import { useTranslation } from "react-i18next";
import { forwardRef, useMemo, useRef } from "react";
import { useMemo, useRef } from "react";
import day from "../../utils/day.js";
import "./task-center.styles.scss";
import {
@@ -12,8 +12,18 @@ import {
QuestionCircleOutlined
} from "@ant-design/icons";
const TaskCenterComponent = forwardRef(
({ visible, tasks, loading, error, onTaskClick, onLoadMore, hasMore, createNewTask, incompleteTaskCount }, ref) => {
const TaskCenterComponent = ({
visible,
tasks,
loading,
error,
onTaskClick,
onLoadMore,
hasMore,
createNewTask,
incompleteTaskCount,
ref
}) => {
const { t } = useTranslation();
const virtuosoRef = useRef(null);
@@ -149,8 +159,7 @@ const TaskCenterComponent = forwardRef(
)}
</div>
);
}
);
};
TaskCenterComponent.displayName = "TaskCenterComponent";
export default TaskCenterComponent;