refactor: clean up unused imports and improve code readability and fixed endpoint to use window location

This commit is contained in:
2025-12-22 15:57:07 +00:00
parent b79fde777d
commit 79e759d811
3 changed files with 5 additions and 4 deletions

View File

@@ -2,6 +2,7 @@ import { useFormikContext } from "formik";
import FormGroup from "../components/FormGroup";
import { toast } from "sonner";
import { useSystemConfig } from "../../../hooks/useSystemConfig";
import { CAM_BASE } from "../../../utils/config";
type SystemFileUploadProps = {
name: string;
@@ -19,7 +20,7 @@ const SystemFileUpload = ({ name, selectedFile }: SystemFileUploadProps) => {
opts: {
timeoutMs: 30000,
fieldName: "upload",
uploadUrl: "http://192.168.75.11/upload/software-update/4",
uploadUrl: `${CAM_BASE}/upload/software-update/4`,
},
};
uploadSettings(settings);