This commit is contained in:
louiscklaw
2025-04-21 05:36:41 +08:00
parent f65f6df660
commit d2f9472743
9 changed files with 39 additions and 13 deletions

View File

@@ -30,14 +30,37 @@ function LessonTypeCount(): React.JSX.Element {
}, []);
if (isLoading) {
return <LoadingSummary />;
return (
<LoadingSummary
diff={15}
icon={ListChecksIcon}
title={t('課程類型')}
trend="up"
/>
);
}
if (error) {
return <Summary amount={0} diff={0} icon={ListChecksIcon} title={t('Error')} trend="down" />;
return (
<Summary
amount={0}
diff={0}
icon={ListChecksIcon}
title={t('Error')}
trend="down"
/>
);
}
return <Summary amount={amount} diff={15} icon={ListChecksIcon} title={t('課程類型')} trend="up" />;
return (
<Summary
amount={amount}
diff={15}
icon={ListChecksIcon}
title={t('課程類型')}
trend="up"
/>
);
}
export default React.memo(LessonTypeCount);