From 099c21c931d3dabdd4c966bcd99e02e5306ba26e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Grzegorz=20T=C5=82uszcz?= Date: Sun, 29 Sep 2024 06:35:50 +0200 Subject: [PATCH] Fix accordion auto opening --- src/components/Declaration.tsx | 4 ++-- src/routes/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Declaration.tsx b/src/components/Declaration.tsx index f59d436..7893454 100644 --- a/src/components/Declaration.tsx +++ b/src/components/Declaration.tsx @@ -119,8 +119,8 @@ function DeclarationContent({ model, setModel }: { model: Model; setModel: Dispa

Deklaracja PCC-3

- { - setValue(value ==='' ? null : value as keyof Model) + { + setValue(value === '' ? null : value as keyof Model) }} collapsible className="mt-4"> A. Okres, miejsce i cel składania deklaracji diff --git a/src/routes/index.tsx b/src/routes/index.tsx index 06836a7..7bff761 100644 --- a/src/routes/index.tsx +++ b/src/routes/index.tsx @@ -23,7 +23,7 @@ function Index() { mutationFn: chat, onSuccess(data) { setMessages((messages) => [...messages, { role: 'assistant', content: data.text }]) - setModel((model) => merge(model, data.model)) + setModel((model) => ({...merge(model, data.model)})) }, })