mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-11 20:43:42 +08:00
fix Toast click
This commit is contained in:
@@ -197,11 +197,19 @@ export function showToast(
|
||||
}, 300);
|
||||
};
|
||||
|
||||
const newAction = {
|
||||
text: action?.text || "",
|
||||
onClick: () => {
|
||||
action?.onClick();
|
||||
close();
|
||||
},
|
||||
};
|
||||
|
||||
setTimeout(() => {
|
||||
close();
|
||||
}, delay);
|
||||
|
||||
root.render(<Toast content={content} action={action} />);
|
||||
root.render(<Toast content={content} action={newAction} />);
|
||||
}
|
||||
|
||||
export type InputProps = React.HTMLProps<HTMLTextAreaElement> & {
|
||||
|
Reference in New Issue
Block a user