renamed a type + small improvements

This commit is contained in:
Daniel
2023-06-16 16:25:21 +03:30
parent 93558bb791
commit c1831b650d
18 changed files with 70 additions and 70 deletions
+8 -7
View File
@@ -1,5 +1,5 @@
import {
CollectionIncludingMembers,
CollectionIncludingMembersAndLinkCount,
LinkIncludingShortenedCollectionAndTags,
} from "@/types/global";
import {
@@ -34,17 +34,18 @@ export default function LinkCard({ link, count, className }: Props) {
const { account } = useAccountStore();
const [collection, setCollection] = useState<CollectionIncludingMembers>(
collections.find(
(e) => e.id === link.collection.id
) as CollectionIncludingMembers
);
const [collection, setCollection] =
useState<CollectionIncludingMembersAndLinkCount>(
collections.find(
(e) => e.id === link.collection.id
) as CollectionIncludingMembersAndLinkCount
);
useEffect(() => {
setCollection(
collections.find(
(e) => e.id === link.collection.id
) as CollectionIncludingMembers
) as CollectionIncludingMembersAndLinkCount
);
}, [collections]);