refactor: unify design-system components across pages
- Replace native textarea with Textarea in translator and text-speaker pages - Replace custom loading spinners with Skeleton in InDeck and FavoritesClient pages - Add shared constants DEFAULT_NEW_PER_DAY, DEFAULT_REV_PER_DAY
This commit is contained in:
@@ -12,6 +12,8 @@ import { toast } from "sonner";
|
||||
import { PageLayout } from "@/components/ui/PageLayout";
|
||||
import { PageHeader } from "@/components/ui/PageHeader";
|
||||
import { CardList } from "@/components/ui/CardList";
|
||||
import { VStack } from "@/design-system/layout/stack";
|
||||
import { Skeleton } from "@/design-system/feedback/skeleton";
|
||||
import { actionGetUserFavoriteDecks, actionToggleDeckFavorite } from "@/modules/deck/deck-action";
|
||||
import type { ActionOutputUserFavoriteDeck } from "@/modules/deck/deck-action-dto";
|
||||
|
||||
@@ -102,10 +104,10 @@ export function FavoritesClient({ initialFavorites }: FavoritesClientProps) {
|
||||
|
||||
<CardList>
|
||||
{loading ? (
|
||||
<div className="p-8 text-center">
|
||||
<div className="w-8 h-8 border-2 border-gray-200 border-t-gray-400 rounded-full animate-spin mx-auto mb-3"></div>
|
||||
<VStack align="center" className="p-8">
|
||||
<Skeleton variant="circular" className="w-8 h-8" />
|
||||
<p className="text-sm text-gray-500">{t("loading")}</p>
|
||||
</div>
|
||||
</VStack>
|
||||
) : favorites.length === 0 ? (
|
||||
<div className="text-center py-12 text-gray-400">
|
||||
<div className="w-16 h-16 mx-auto mb-3 rounded-full bg-gray-100 flex items-center justify-center">
|
||||
|
||||
Reference in New Issue
Block a user