feature/IO-3291-Tasks-Notifications: Checkpoint

This commit is contained in:
Dave Richer
2025-07-09 11:14:04 -04:00
parent 2e3944099b
commit 9ab2fdc868
5 changed files with 88 additions and 36 deletions

View File

@@ -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>
);
});