fix: update test url

This commit is contained in:
nhsmw 2024-07-19 10:32:41 +08:00 committed by GitHub
parent 32edc0f1fe
commit 22bcc2e438

View File

@ -28,7 +28,7 @@ interface Props {
onDelete: (uid: string) => void;
}
let eventListener: UnlistenFn | null = null;
let eventListener: UnlistenFn = () => {};
export const TestItem = (props: Props) => {
const { itemData, onEdit, onDelete: onDeleteItem } = props;
@ -90,9 +90,7 @@ export const TestItem = (props: Props) => {
];
const listenTsetEvent = async () => {
if (eventListener !== null) {
eventListener();
}
eventListener = await listen("verge://test-all", () => {
onDelay();
});
@ -100,7 +98,7 @@ export const TestItem = (props: Props) => {
useEffect(() => {
listenTsetEvent();
}, []);
}, [url]);
return (
<Box