Add Login & Register
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { useFormContext, Controller } from 'react-hook-form';
|
||||
// @mui
|
||||
import { Switch, FormControlLabel, FormControlLabelProps } from '@mui/material';
|
||||
import { useEffect, useState } from 'react';
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
@@ -27,3 +28,29 @@ export default function RHFSwitch({ name, ...other }: Props) {
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
// interface Props extends IProps {
|
||||
// valueTrue: any,
|
||||
// valueFalse: any,
|
||||
// }
|
||||
|
||||
// export function RHFSwitchEnum({ name, valueTrue, valueFalse, ...other}: Props) {
|
||||
// const { control } = useFormContext();
|
||||
// const [isChecked, setIsChecked] = useState(valueTrue === field.value);
|
||||
// useEffect(() => {
|
||||
// // setIsChecked()
|
||||
// }, [])
|
||||
|
||||
// return (
|
||||
// <FormControlLabel
|
||||
// control={
|
||||
// <Controller
|
||||
// name={name}
|
||||
// control={control}
|
||||
// render={({ field }) => <Switch {...field} checked={field.value} />}
|
||||
// />
|
||||
// }
|
||||
// {...other}
|
||||
// />
|
||||
// );
|
||||
// }
|
||||
@@ -325,6 +325,7 @@ export default function CorporateForm({ isEdit, currentCorporate }: Props) {
|
||||
<Grid item xs={12} md={4}>
|
||||
<Stack spacing={3}>
|
||||
<Card sx={{ p: 3 }}>
|
||||
{ JSON.stringify(values.active) }
|
||||
<RHFSwitch name="active" label="Is Company Active" />
|
||||
<Stack spacing={3} mt={2}>
|
||||
<Typography align="center">Company Logo</Typography>
|
||||
|
||||
Reference in New Issue
Block a user