revert previous change
This commit is contained in:
parent
080be856cc
commit
fda782ec44
|
@ -13,7 +13,7 @@ export default function BulkDeleteLinksModal({ onClose }: Props) {
|
||||||
const deleteLink = async () => {
|
const deleteLink = async () => {
|
||||||
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
|
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
|
||||||
|
|
||||||
const response = await deleteLinksById(selectedLinks.map(link => link.id));
|
const response = await deleteLinksById(selectedLinks.map(link => link.id as number));
|
||||||
|
|
||||||
toast.dismiss(load);
|
toast.dismiss(load);
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ export default function BulkEditLinksModal({ onClose }: Props) {
|
||||||
if (!submitLoader) {
|
if (!submitLoader) {
|
||||||
setSubmitLoader(true);
|
setSubmitLoader(true);
|
||||||
|
|
||||||
|
|
||||||
const load = toast.loading("Updating...");
|
const load = toast.loading("Updating...");
|
||||||
|
|
||||||
const response = await updateLinks(selectedLinks, updatedValues);
|
const response = await updateLinks(selectedLinks, updatedValues);
|
||||||
|
|
|
@ -122,7 +122,7 @@ export default function Index() {
|
||||||
const bulkDeleteLinks = async () => {
|
const bulkDeleteLinks = async () => {
|
||||||
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
|
const load = toast.loading(`Deleting ${selectedLinks.length} Link${selectedLinks.length > 1 ? "s" : ""}...`);
|
||||||
|
|
||||||
const response = await deleteLinksById(selectedLinks.map((link) => link.id));
|
const response = await deleteLinksById(selectedLinks.map((link) => link.id as number));
|
||||||
|
|
||||||
toast.dismiss(load);
|
toast.dismiss(load);
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ export interface LinkIncludingShortenedCollectionAndTags
|
||||||
Link,
|
Link,
|
||||||
"id" | "createdAt" | "collectionId" | "updatedAt" | "lastPreserved"
|
"id" | "createdAt" | "collectionId" | "updatedAt" | "lastPreserved"
|
||||||
> {
|
> {
|
||||||
id: number;
|
id?: number;
|
||||||
createdAt?: string;
|
createdAt?: string;
|
||||||
collectionId?: number;
|
collectionId?: number;
|
||||||
tags: Tag[];
|
tags: Tag[];
|
||||||
|
|
Ŝarĝante…
Reference in New Issue