에러 수정

This commit is contained in:
kjs 2025-10-22 14:56:58 +09:00
parent eb1cac4a77
commit 96df465a7d
1 changed files with 7 additions and 38 deletions

View File

@ -5,10 +5,14 @@ import { useRouter } from "next/navigation";
import { dashboardApi } from "@/lib/api/dashboard";
import { Dashboard } from "@/lib/api/dashboard";
import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { Input } from "@/components/ui/input";
import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table";
import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@/components/ui/dropdown-menu";
import {
AlertDialog,
AlertDialogAction,
@ -21,7 +25,7 @@ import {
} from "@/components/ui/alert-dialog";
import { useToast } from "@/hooks/use-toast";
import { Pagination, PaginationInfo } from "@/components/common/Pagination";
import { Plus, Search, Edit, Trash2, Copy, LayoutDashboard, MoreHorizontal } from "lucide-react";
import { Plus, Search, Edit, Trash2, Copy, MoreVertical } from "lucide-react";
/**
*
@ -197,23 +201,6 @@ export default function DashboardListPage() {
</Button>
</div>
{/* 에러 메시지 */}
{error && (
<div className="border-destructive/50 bg-destructive/10 rounded-lg border p-4">
<div className="flex items-center justify-between">
<p className="text-destructive text-sm font-semibold"> </p>
<button
onClick={() => setError(null)}
className="text-destructive hover:text-destructive/80 transition-colors"
aria-label="에러 메시지 닫기"
>
</button>
</div>
<p className="text-destructive/80 mt-1.5 text-sm">{error}</p>
</div>
)}
{/* 대시보드 목록 */}
{dashboards.length === 0 ? (
<div className="bg-card flex h-64 flex-col items-center justify-center rounded-lg border shadow-sm">
@ -315,24 +302,6 @@ export default function DashboardListPage() {
</AlertDialogFooter>
</AlertDialogContent>
</AlertDialog>
{/* 성공 모달 */}
<Dialog open={successDialogOpen} onOpenChange={setSuccessDialogOpen}>
<DialogContent className="max-w-[95vw] sm:max-w-md">
<DialogHeader>
<div className="bg-primary/10 mx-auto flex h-12 w-12 items-center justify-center rounded-full">
<CheckCircle2 className="text-primary h-6 w-6" />
</div>
<DialogTitle className="text-center text-base sm:text-lg"></DialogTitle>
<DialogDescription className="text-center text-xs sm:text-sm">{successMessage}</DialogDescription>
</DialogHeader>
<div className="flex justify-center pt-4">
<Button onClick={() => setSuccessDialogOpen(false)} className="h-8 text-xs sm:h-10 sm:text-sm">
</Button>
</div>
</DialogContent>
</Dialog>
</div>
);
}