sd
This commit is contained in:
@@ -3,7 +3,7 @@ import { useState } from 'react';
|
|||||||
import { FaCheck, FaDownload, FaExclamationTriangle, FaTimes, FaUpload } from 'react-icons/fa';
|
import { FaCheck, FaDownload, FaExclamationTriangle, FaTimes, FaUpload } from 'react-icons/fa';
|
||||||
import { MdSettings } from 'react-icons/md';
|
import { MdSettings } from 'react-icons/md';
|
||||||
import { getapi, isMediumScreen, postapi } from '../../js/utils';
|
import { getapi, isMediumScreen, postapi } from '../../js/utils';
|
||||||
import { errorNotify, successNotify } from '../../js/utils';
|
import { errorNotify, okNotify } from '../../js/utils';
|
||||||
|
|
||||||
export default function SetupPage() {
|
export default function SetupPage() {
|
||||||
const [file, setFile] = useState<File | null>(null);
|
const [file, setFile] = useState<File | null>(null);
|
||||||
@@ -26,7 +26,7 @@ export default function SetupPage() {
|
|||||||
a.click();
|
a.click();
|
||||||
document.body.removeChild(a);
|
document.body.removeChild(a);
|
||||||
URL.revokeObjectURL(url);
|
URL.revokeObjectURL(url);
|
||||||
successNotify('Configuration exported successfully');
|
okNotify('Configuration exported successfully', '');
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
errorNotify('Failed to export configuration', String(err));
|
errorNotify('Failed to export configuration', String(err));
|
||||||
} finally {
|
} finally {
|
||||||
@@ -61,7 +61,7 @@ export default function SetupPage() {
|
|||||||
setImportResult(result);
|
setImportResult(result);
|
||||||
|
|
||||||
if (result.status === 'ok') {
|
if (result.status === 'ok') {
|
||||||
successNotify('Configuration imported successfully');
|
okNotify('Configuration imported successfully', '');
|
||||||
} else {
|
} else {
|
||||||
errorNotify('Configuration imported with errors', 'Check the results below');
|
errorNotify('Configuration imported with errors', 'Check the results below');
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ export default function SetupPage() {
|
|||||||
setImportResult(result);
|
setImportResult(result);
|
||||||
|
|
||||||
if (result.status === 'ok') {
|
if (result.status === 'ok') {
|
||||||
successNotify('Configuration imported successfully');
|
okNotify('Configuration imported successfully', '');
|
||||||
} else {
|
} else {
|
||||||
errorNotify('Configuration imported with errors', 'Check the results below');
|
errorNotify('Configuration imported with errors', 'Check the results below');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user