added cursor based pagination for links

This commit is contained in:
Daniel
2023-06-15 02:04:54 +03:30
parent 6323badbaf
commit 1b6d902c75
29 changed files with 507 additions and 182 deletions
+3 -3
View File
@@ -1,12 +1,12 @@
import {
CollectionIncludingMembers,
LinkIncludingCollectionAndTags,
LinkIncludingShortenedCollectionAndTags,
Sort,
} from "@/types/global";
import { SetStateAction, useEffect } from "react";
type Props<
T extends CollectionIncludingMembers | LinkIncludingCollectionAndTags
T extends CollectionIncludingMembers | LinkIncludingShortenedCollectionAndTags
> = {
sortBy: Sort;
@@ -15,7 +15,7 @@ type Props<
};
export default function useSort<
T extends CollectionIncludingMembers | LinkIncludingCollectionAndTags
T extends CollectionIncludingMembers | LinkIncludingShortenedCollectionAndTags
>({ sortBy, data, setData }: Props<T>) {
useEffect(() => {
const dataArray = [...data];