File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ const MainLayout: React.FC<{
4242 className : string ;
4343 pageName ?: string ;
4444} > = ( { children, className, pageName } ) => {
45+ const [ modal , contextHolder ] = Modal . useModal ( ) ;
4546 const { colorThemeState, updateColorTheme } = useAppContext ( ) ;
4647
4748 const importRef = useRef < RefTextAreaType > ( null ) ;
@@ -51,7 +52,7 @@ const MainLayout: React.FC<{
5152
5253 const showImportResult = ( stat : Awaited < ReturnType < ScriptClient [ "importByUrls" ] > > ) => {
5354 if ( ! stat ) return ;
54- Modal . info ( {
55+ modal . info ! ( {
5556 title : t ( "script_import_result" ) ,
5657 content : (
5758 < Space direction = "vertical" style = { { width : "100%" } } >
@@ -198,6 +199,7 @@ const MainLayout: React.FC<{
198199 } }
199200 locale = { arcoLocale ( i18n . language ) }
200201 >
202+ { contextHolder }
201203 < Layout >
202204 < Layout . Header
203205 style = { {
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ import { migrateToChromeStorage } from "@App/app/migrate";
2727import { useSystemConfig } from "./utils" ;
2828
2929function Tools ( ) {
30+ const [ modal , contextHolder ] = Modal . useModal ( ) ;
3031 const [ loading , setLoading ] = useState < { [ key : string ] : boolean } > ( { } ) ;
3132 const fileRef = useRef < HTMLInputElement > ( null ) ;
3233 const [ backupFileList , setBackupFileList ] = useState < File [ ] > ( [ ] ) ;
@@ -47,6 +48,7 @@ function Tools() {
4748 position : "relative" ,
4849 } }
4950 >
51+ { contextHolder }
5052 < Card className = "backup" title = { t ( "backup" ) } bordered = { false } >
5153 < Space direction = "vertical" >
5254 < Title heading = { 6 } > { t ( "local" ) } </ Title >
@@ -226,7 +228,7 @@ function Tools() {
226228 status = "danger"
227229 size = "small"
228230 onClick = { ( ) => {
229- Modal . confirm ( {
231+ modal . confirm ! ( {
230232 title : t ( "confirm_delete" ) ,
231233 content : `${ t ( "confirm_delete_backup_file" ) } ${ item . name } ?` ,
232234 onOk : async ( ) => {
You can’t perform that action at this time.
0 commit comments