add initialData to queries

This commit is contained in:
daniel31x13
2024-08-01 18:40:08 -04:00
parent 75b1ae738f
commit a73e5fa6c6
35 changed files with 46 additions and 39 deletions
+2 -2
View File
@@ -34,7 +34,7 @@ export default function Index() {
const router = useRouter();
const { links } = useLinkStore();
const { data: collections = [] } = useCollections();
const { data: collections } = useCollections();
const [sortBy, setSortBy] = useState<Sort>(Sort.DateNewestFirst);
@@ -51,7 +51,7 @@ export default function Index() {
);
}, [router, collections]);
const { data: user = [] } = useUser();
const { data: user } = useUser();
const [collectionOwner, setCollectionOwner] = useState({
id: null as unknown as number,
+1 -1
View File
@@ -13,7 +13,7 @@ import { useCollections } from "@/hooks/store/collections";
export default function Collections() {
const { t } = useTranslation();
const { data: collections = [] } = useCollections();
const { data: collections } = useCollections();
const [sortBy, setSortBy] = useState<Sort>(Sort.DateNewestFirst);
const [sortedCollections, setSortedCollections] = useState(collections);