From 2a49da6cca3f2fcf7d7f6c93ec6683855d61778b Mon Sep 17 00:00:00 2001
From: zZOMZz <1412246432@qq.com>
Date: Sat, 29 Apr 2023 01:44:09 +0800
Subject: [PATCH] fix Toast click
---
app/components/ui-lib.tsx | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/app/components/ui-lib.tsx b/app/components/ui-lib.tsx
index 5b6ed9598..78ac1a715 100644
--- a/app/components/ui-lib.tsx
+++ b/app/components/ui-lib.tsx
@@ -197,11 +197,19 @@ export function showToast(
}, 300);
};
+ const newAction = {
+ text: action?.text || "",
+ onClick: () => {
+ action?.onClick();
+ close();
+ },
+ };
+
setTimeout(() => {
close();
}, delay);
- root.render();
+ root.render();
}
export type InputProps = React.HTMLProps & {