added settings modal UI

This commit is contained in:
Daniel
2023-05-18 21:32:17 +03:30
parent a5d0d08c93
commit e3862188de
15 changed files with 74 additions and 24 deletions
+4 -1
View File
@@ -8,18 +8,21 @@ import { useEffect } from "react";
import { useSession } from "next-auth/react";
import useTagStore from "@/store/tags";
import useLinkStore from "@/store/links";
import useAccountStore from "@/store/account";
export default function () {
const { status } = useSession();
const { status, data } = useSession();
const { setCollections } = useCollectionStore();
const { setTags } = useTagStore();
const { setLinks } = useLinkStore();
const { setAccount } = useAccountStore();
useEffect(() => {
if (status === "authenticated") {
setCollections();
setTags();
setLinks();
setAccount(data.user.email as string);
}
}, [status]);
}