diff --git a/src/ui/Layout.tsx b/src/ui/Layout.tsx index fa3168a..933b4fb 100644 --- a/src/ui/Layout.tsx +++ b/src/ui/Layout.tsx @@ -3,31 +3,35 @@ import { AppSidebar } from './components/AppSidebar' import { Icons } from './components/Icons' import { Separator } from './components/ui/separator' import { SidebarInset, SidebarProvider, SidebarTrigger } from './components/ui/sidebar' +import { Toaster } from './components/ui/sonner' export default function Layout() { return ( - - - -
-
- - - Forgery -
- - - -
-
- -
-
-
+ <> + + + +
+
+ + + Forgery +
+ + + +
+
+ +
+
+
+ + ) } diff --git a/src/ui/components/CreateLookDialog.tsx b/src/ui/components/CreateLookDialog.tsx index f19c00f..7ef8774 100644 --- a/src/ui/components/CreateLookDialog.tsx +++ b/src/ui/components/CreateLookDialog.tsx @@ -11,12 +11,12 @@ import { SaveOutfitDialog } from './SaveOutfitDialog' import { Badge } from './ui/badge' import { Button } from './ui/button' import { - Dialog, - DialogContent, - DialogDescription, - DialogFooter, - DialogHeader, - DialogTitle, + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, } from './ui/dialog' import { Label } from './ui/label' import { ScrollArea, ScrollBar } from './ui/scroll-area' @@ -52,7 +52,6 @@ export const CreateLookDialog: React.FC = ({ const [selectedExpressionId, setSelectedExpressionId] = useState(null) const [userPrompt, setUserPrompt] = useState('') const [submitting, setSubmitting] = useState(false) - const [error, setError] = useState(null) const [loadOutfitOpen, setLoadOutfitOpen] = useState(false) const [saveOutfitOpen, setSaveOutfitOpen] = useState(false) @@ -143,7 +142,6 @@ export const CreateLookDialog: React.FC = ({ const handleCreate = async () => { if (selectedEquipments.length === 0) return setSubmitting(true) - setError(null) try { const res = await client.generations.$post({ @@ -167,7 +165,7 @@ export const CreateLookDialog: React.FC = ({ setUserPrompt('') } catch (e) { console.error(e) - setError(e instanceof Error ? e.message : 'Something went wrong') + toast.error(e instanceof Error ? e.message : 'Something went wrong') } finally { setSubmitting(false) } @@ -532,7 +530,6 @@ export const CreateLookDialog: React.FC = ({
- {error && {error}}