storing changes, starting history list
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { useFormikContext } from "formik";
|
||||
|
||||
import FormGroup from "../components/FormGroup";
|
||||
import { toast } from "sonner";
|
||||
import { useSystemConfig } from "../../../hooks/useSystemConfig";
|
||||
|
||||
type SystemFileUploadProps = {
|
||||
name: string;
|
||||
@@ -10,7 +10,16 @@ type SystemFileUploadProps = {
|
||||
|
||||
const SystemFileUpload = ({ name, selectedFile }: SystemFileUploadProps) => {
|
||||
const { setFieldValue } = useFormikContext();
|
||||
const handleFileUploadClick = () => console.log(selectedFile);
|
||||
const { uploadSettings } = useSystemConfig();
|
||||
|
||||
const handleFileUploadClick = () => {
|
||||
if (!selectedFile) return;
|
||||
uploadSettings(selectedFile, {
|
||||
timeoutMs: 30000,
|
||||
fieldName: "upload",
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
<div className="py-8 w-full">
|
||||
<FormGroup>
|
||||
|
||||
Reference in New Issue
Block a user