fix: update - dark mode, i18n, bug fixes across frontend pages
This commit is contained in:
@@ -357,7 +357,7 @@ const TaskCenter: React.FC = () => {
|
||||
);
|
||||
};
|
||||
|
||||
const renderTaskList = (taskList: ApiTask[], emptyText: string) => {
|
||||
const renderTaskList = (taskList: ApiTask[]) => {
|
||||
if (tasksLoading) return <div style={{ textAlign: "center", padding: 24 }}><Spin /></div>;
|
||||
if (taskList.length === 0) return <Empty description={t('taskCenter.noTasks')} />;
|
||||
return <div className="task-list">{taskList.map(renderTaskCard)}</div>;
|
||||
@@ -399,12 +399,12 @@ const TaskCenter: React.FC = () => {
|
||||
{
|
||||
key: "daily",
|
||||
label: <span><FireOutlined /> {t('taskCenter.dailyTasks')}</span>,
|
||||
children: renderTaskList(dailyTasks, t('taskCenter.noTasks')),
|
||||
children: renderTaskList(dailyTasks),
|
||||
},
|
||||
{
|
||||
key: "weekly",
|
||||
label: <span><CalendarOutlined /> {t('taskCenter.weeklyTasks')}</span>,
|
||||
children: renderTaskList(weeklyTasks, t('taskCenter.noTasks')),
|
||||
children: renderTaskList(weeklyTasks),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user