refactor(frontend): Replace LoadingSpinner with shadcn skeleton components.

- Created AccountsSkeleton.tsx and NotificationsSkeleton.tsx components
- Updated AccountsOverview.tsx and Notifications.tsx to use skeletons
- Removed unused LoadingSpinner.tsx component
- Improved loading state UX by showing content structure

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Elisiário Couto
2025-09-16 18:23:50 +01:00
committed by Elisiário Couto
parent fb310a5953
commit 84e609a774
13 changed files with 406 additions and 265 deletions

View File

@@ -12,7 +12,7 @@ import {
TestTube,
} from "lucide-react";
import { apiClient } from "../lib/api";
import LoadingSpinner from "./LoadingSpinner";
import NotificationsSkeleton from "./NotificationsSkeleton";
import {
Card,
CardContent,
@@ -81,11 +81,7 @@ export default function Notifications() {
});
if (settingsLoading || servicesLoading) {
return (
<Card>
<LoadingSpinner message="Loading notifications..." />
</Card>
);
return <NotificationsSkeleton />;
}
if (settingsError || servicesError) {
@@ -235,7 +231,9 @@ export default function Notifications() {
</h4>
<div className="flex items-center space-x-2 mt-1">
<Badge
variant={service.enabled ? "default" : "destructive"}
variant={
service.enabled ? "default" : "destructive"
}
>
{service.enabled ? (
<CheckCircle className="h-3 w-3 mr-1" />
@@ -245,7 +243,9 @@ export default function Notifications() {
{service.enabled ? "Enabled" : "Disabled"}
</Badge>
<Badge
variant={service.configured ? "secondary" : "outline"}
variant={
service.configured ? "secondary" : "outline"
}
>
{service.configured
? "Configured"