From 06e79f83d717fb3aedd300cfb3beac50460ff08c Mon Sep 17 00:00:00 2001 From: "Syed M. Sawaid" <34231494+SyedMSawaid@users.noreply.github.com> Date: Sat, 26 Oct 2024 16:11:02 +0200 Subject: [PATCH] fixed chat implicit type --- src/atoms/state.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/atoms/state.ts b/src/atoms/state.ts index ec0957d..0b3a484 100644 --- a/src/atoms/state.ts +++ b/src/atoms/state.ts @@ -1,3 +1,4 @@ +import { Chat } from "@/data"; import { atom } from "recoil"; export const applicationState = atom({ @@ -17,7 +18,7 @@ export const applicationState = atom({ export const chatState = atom({ key: "chatState", default: { - chats: JSON.parse(localStorage.getItem("chats") ?? "[]"), + chats: JSON.parse(localStorage.getItem("chats") ?? "[]") as Chat[], }, effects: [ ({ onSet }) => {