Remove type assertions
This commit is contained in:
parent
d631754b50
commit
8f7e0b8d09
|
@ -15,12 +15,11 @@ import DeleteCollectionModal from "./ModalContent/DeleteCollectionModal";
|
|||
import { dropdownTriggerer } from "@/lib/client/utils";
|
||||
import { useTranslation } from "next-i18next";
|
||||
|
||||
type Props = {
|
||||
export default function CollectionCard({
|
||||
collection,
|
||||
}: {
|
||||
collection: CollectionIncludingMembersAndLinkCount;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export default function CollectionCard({ collection, className }: Props) {
|
||||
}) {
|
||||
const { t } = useTranslation();
|
||||
const { settings } = useLocalSettingsStore();
|
||||
const { account } = useAccountStore();
|
||||
|
@ -49,11 +48,11 @@ export default function CollectionCard({ collection, className }: Props) {
|
|||
setCollectionOwner({
|
||||
id: account.id as number,
|
||||
name: account.name,
|
||||
username: account.username as string,
|
||||
image: account.image as string,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot as boolean,
|
||||
archiveAsMonolith: account.archiveAsMonolith as boolean,
|
||||
archiveAsPDF: account.archiveAsPDF as boolean,
|
||||
username: account.username,
|
||||
image: account.image,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot,
|
||||
archiveAsMonolith: account.archiveAsMonolith,
|
||||
archiveAsPDF: account.archiveAsPDF,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -10,11 +10,11 @@ type Props = {
|
|||
onChange: any;
|
||||
showDefaultValue?: boolean;
|
||||
defaultValue?:
|
||||
| {
|
||||
label: string;
|
||||
value?: number;
|
||||
}
|
||||
| undefined;
|
||||
| {
|
||||
label: string;
|
||||
value?: number;
|
||||
}
|
||||
| undefined;
|
||||
creatable?: boolean;
|
||||
};
|
||||
|
||||
|
@ -107,7 +107,7 @@ export default function CollectionSelection({
|
|||
components={{
|
||||
Option: customOption,
|
||||
}}
|
||||
// menuPosition="fixed"
|
||||
// menuPosition="fixed"
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
|
@ -123,7 +123,7 @@ export default function CollectionSelection({
|
|||
components={{
|
||||
Option: customOption,
|
||||
}}
|
||||
// menuPosition="fixed"
|
||||
// menuPosition="fixed"
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
|
|
@ -51,13 +51,13 @@ export default function PreservedFormatsModal({ onClose, activeLink }: Props) {
|
|||
setCollectionOwner(owner);
|
||||
} else if (link.collection.ownerId === account.id) {
|
||||
setCollectionOwner({
|
||||
id: account.id as number,
|
||||
id: account.id,
|
||||
name: account.name,
|
||||
username: account.username as string,
|
||||
image: account.image as string,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot as boolean,
|
||||
archiveAsMonolith: account.archiveAsScreenshot as boolean,
|
||||
archiveAsPDF: account.archiveAsPDF as boolean,
|
||||
username: account.username,
|
||||
image: account.image,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot,
|
||||
archiveAsMonolith: account.archiveAsScreenshot,
|
||||
archiveAsPDF: account.archiveAsPDF,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
|
@ -5,7 +5,6 @@ import { useEffect, useState } from "react";
|
|||
|
||||
export default function useCollectivePermissions(collectionIds: number[]) {
|
||||
const { collections } = useCollectionStore();
|
||||
|
||||
const { account } = useAccountStore();
|
||||
|
||||
const [permissions, setPermissions] = useState<Member | true>();
|
||||
|
|
|
@ -69,11 +69,11 @@ export default function Index() {
|
|||
setCollectionOwner({
|
||||
id: account.id as number,
|
||||
name: account.name,
|
||||
username: account.username as string,
|
||||
image: account.image as string,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot as boolean,
|
||||
archiveAsMonolith: account.archiveAsScreenshot as boolean,
|
||||
archiveAsPDF: account.archiveAsPDF as boolean,
|
||||
username: account.username,
|
||||
image: account.image,
|
||||
archiveAsScreenshot: account.archiveAsScreenshot,
|
||||
archiveAsMonolith: account.archiveAsScreenshot,
|
||||
archiveAsPDF: account.archiveAsPDF,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
|
Ŝarĝante…
Reference in New Issue