Added tag support + Post link and many more changes and optimizations.

This commit is contained in:
Daniel
2023-02-24 21:02:28 +03:30
parent e0f4c71eb2
commit 9b53608097
36 changed files with 1062 additions and 176 deletions
+4 -1
View File
@@ -1,14 +1,17 @@
import useCollectionSlice from "@/store/collection";
import { useEffect } from "react";
import { useSession } from "next-auth/react";
import useTagSlice from "@/store/tags";
export default function getInitialData() {
export default function () {
const { status } = useSession();
const { setCollections } = useCollectionSlice();
const { setTags } = useTagSlice();
useEffect(() => {
if (status === "authenticated") {
setCollections();
setTags();
}
}, [status]);
}