feature/IO-3291-Tasks-Notifications: Checkpoint
This commit is contained in:
@@ -8,11 +8,10 @@ import "./task-center.styles.scss";
|
||||
|
||||
const { Text, Title } = Typography;
|
||||
|
||||
const TaskCenterComponent = forwardRef(({ visible, tasks, loading, onTaskClick }, ref) => {
|
||||
const TaskCenterComponent = forwardRef(({ visible, tasks, loading, onTaskClick, onLoadMore, totalTasks }, ref) => {
|
||||
const { t } = useTranslation();
|
||||
const virtuosoRef = useRef(null);
|
||||
|
||||
// Organize tasks into sections
|
||||
const sections = useMemo(() => {
|
||||
const now = day();
|
||||
const today = now.startOf("day");
|
||||
@@ -80,6 +79,11 @@ const TaskCenterComponent = forwardRef(({ visible, tasks, loading, onTaskClick }
|
||||
totalCount={sections.length}
|
||||
itemContent={(index, section) => renderSection(section, index)}
|
||||
/>
|
||||
{tasks.length < totalTasks && (
|
||||
<button onClick={onLoadMore} disabled={loading}>
|
||||
{t("general.labels.load_more")}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user