diff --git a/devfront/src/components/layout/AppLayout.tsx b/devfront/src/components/layout/AppLayout.tsx index 35d9448d..3063028b 100644 --- a/devfront/src/components/layout/AppLayout.tsx +++ b/devfront/src/components/layout/AppLayout.tsx @@ -1,6 +1,7 @@ import { BadgeCheck, Moon, ShieldHalf, Sun } from "lucide-react"; import { useEffect, useState } from "react"; import { NavLink, Outlet } from "react-router-dom"; +import { Toaster } from "../ui/toaster"; const navItems = [{ label: "Clients", to: "/clients", icon: ShieldHalf }]; @@ -105,6 +106,7 @@ function AppLayout() { + ); } diff --git a/devfront/src/features/clients/ClientDetailsPage.tsx b/devfront/src/features/clients/ClientDetailsPage.tsx index dcecfbae..fe20da69 100644 --- a/devfront/src/features/clients/ClientDetailsPage.tsx +++ b/devfront/src/features/clients/ClientDetailsPage.tsx @@ -17,6 +17,8 @@ import { Textarea } from "../../components/ui/textarea"; import { Label } from "../../components/ui/label"; import { fetchClient, updateClient } from "../../lib/devApi"; import { cn } from "../../lib/utils"; +import { CopyButton } from "../../components/ui/copy-button"; +import { toast } from "../../components/ui/use-toast"; function ClientDetailsPage() { const params = useParams(); @@ -48,10 +50,10 @@ function ClientDetailsPage() { }, onSuccess: () => { queryClient.invalidateQueries({ queryKey: ["client", clientId] }); - alert("Redirect URIs가 저장되었습니다."); + toast("Redirect URIs가 저장되었습니다."); }, onError: (err) => { - alert(`저장 실패: ${(err as Error).message}`); + toast(`저장 실패: ${(err as Error).message}`, "error"); }, }); @@ -145,9 +147,10 @@ function ClientDetailsPage() {

{data.client.id}

- + toast("Client ID가 복사되었습니다.")} + />
@@ -173,14 +176,11 @@ function ClientDetailsPage() { > {showSecret ? : } - + onCopy={() => toast("Client Secret이 복사되었습니다.")} + /> @@ -213,14 +213,11 @@ function ClientDetailsPage() { {endpoint.value} - + onCopy={() => toast(`${endpoint.label}가 복사되었습니다.`)} + /> ))} diff --git a/devfront/src/features/clients/ClientsPage.tsx b/devfront/src/features/clients/ClientsPage.tsx index 14a0d3f6..a3ed28a7 100644 --- a/devfront/src/features/clients/ClientsPage.tsx +++ b/devfront/src/features/clients/ClientsPage.tsx @@ -42,6 +42,8 @@ import { updateClientStatus, } from "../../lib/devApi"; import { cn } from "../../lib/utils"; +import { CopyButton } from "../../components/ui/copy-button"; +import { toast } from "../../components/ui/use-toast"; function ClientsPage() { const navigate = useNavigate(); @@ -231,15 +233,13 @@ function ClientsPage() { {client.id} - + onCopy={() => toast("클라이언트 ID가 복사되었습니다.")} + />