fix: delete cards
This commit is contained in:
@ -52,7 +52,8 @@
|
|||||||
"start": "vite",
|
"start": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"intl-extract": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --out-file src/lang.json --flatten true",
|
"intl-extract": "formatjs extract 'src/**/*.ts*' --ignore='**/*.d.ts' --out-file src/lang.json --flatten true",
|
||||||
"intl-compile": "formatjs compile src/lang.json --out-file src/translations/en.json"
|
"intl-compile": "formatjs compile src/lang.json --out-file src/translations/en.json",
|
||||||
|
"pre:commit": "yarn intl-extract && yarn intl-compile && yarn prettier --write ."
|
||||||
},
|
},
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
|
@ -6,7 +6,6 @@ import { SnortContext } from "@snort/system-react";
|
|||||||
import { CardItem } from ".";
|
import { CardItem } from ".";
|
||||||
import { USER_CARDS } from "@/const";
|
import { USER_CARDS } from "@/const";
|
||||||
import { useLogin } from "@/hooks/login";
|
import { useLogin } from "@/hooks/login";
|
||||||
import { Login } from "@/login";
|
|
||||||
import { Tags } from "@/types";
|
import { Tags } from "@/types";
|
||||||
import { findTag } from "@/utils";
|
import { findTag } from "@/utils";
|
||||||
import { EditCard } from "./edit-card";
|
import { EditCard } from "./edit-card";
|
||||||
@ -88,7 +87,6 @@ export function Card({ canEdit, ev, cards }: CardProps) {
|
|||||||
});
|
});
|
||||||
console.debug(userCardsEv);
|
console.debug(userCardsEv);
|
||||||
await system.BroadcastEvent(userCardsEv);
|
await system.BroadcastEvent(userCardsEv);
|
||||||
Login.setCards(newTags, userCardsEv.created_at);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { CARD, USER_CARDS } from "@/const";
|
import { CARD, USER_CARDS } from "@/const";
|
||||||
import { useLogin } from "@/hooks/login";
|
import { useLogin } from "@/hooks/login";
|
||||||
import { Login } from "@/login";
|
|
||||||
import { removeUndefined } from "@snort/shared";
|
import { removeUndefined } from "@snort/shared";
|
||||||
import { TaggedNostrEvent, NostrLink } from "@snort/system";
|
import { TaggedNostrEvent, NostrLink } from "@snort/system";
|
||||||
import { SnortContext } from "@snort/system-react";
|
import { SnortContext } from "@snort/system-react";
|
||||||
@ -60,7 +59,6 @@ export function EditCard({ card, cards }: EditCardProps) {
|
|||||||
|
|
||||||
console.debug(userCardsEv);
|
console.debug(userCardsEv);
|
||||||
await system.BroadcastEvent(userCardsEv);
|
await system.BroadcastEvent(userCardsEv);
|
||||||
Login.setCards(newTags, userCardsEv.created_at);
|
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user