mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-08-02 18:41:35 +08:00
fix(ui): add close button to all success toasts
This commit is contained in:
@@ -234,7 +234,9 @@ const JsonEditor: React.FC<JsonEditorProps> = ({
|
||||
try {
|
||||
const formatted = formatJSON(currentValue);
|
||||
onChange(formatted);
|
||||
toast.success(t("common.formatSuccess", { defaultValue: "格式化成功" }));
|
||||
toast.success(t("common.formatSuccess", { defaultValue: "格式化成功" }), {
|
||||
closeButton: true,
|
||||
});
|
||||
} catch (error) {
|
||||
const errorMessage =
|
||||
error instanceof Error ? error.message : String(error);
|
||||
|
||||
Reference in New Issue
Block a user