refactor tags store

This commit is contained in:
daniel31x13
2024-08-01 17:23:51 -04:00
parent e889509697
commit da8dc83b8f
8 changed files with 108 additions and 107 deletions
-5
View File
@@ -1,13 +1,10 @@
import { useEffect } from "react";
import { useSession } from "next-auth/react";
import useTagStore from "@/store/tags";
import useLocalSettingsStore from "@/store/localSettings";
import { useUser } from "./store/user";
export default function useInitialData() {
const { status, data } = useSession();
// const { setCollections } = useCollectionStore();
const { setTags } = useTagStore();
// const { setLinks } = useLinkStore();
const { data: user = [] } = useUser();
const { setSettings } = useLocalSettingsStore();
@@ -19,8 +16,6 @@ export default function useInitialData() {
// Get the rest of the data
useEffect(() => {
if (user.id && (!process.env.NEXT_PUBLIC_STRIPE || user.username)) {
// setCollections();
setTags();
// setLinks();
}
}, [user]);