Skip to content

Commit

Permalink
fixed chat implicit type
Browse files Browse the repository at this point in the history
  • Loading branch information
SyedMSawaid committed Oct 26, 2024
1 parent c16c8ec commit 06e79f8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/atoms/state.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Chat } from "@/data";
import { atom } from "recoil";

export const applicationState = atom({
Expand All @@ -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 }) => {
Expand Down

0 comments on commit 06e79f8

Please sign in to comment.