feature/IO-3499-React-19: Remove redundant forward refs in favor of React 19 built in ref prop
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user