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