refactor: disable react compiler

This commit is contained in:
Carlos Valente
2025-07-13 08:12:02 +02:00
parent e5f8a99bff
commit fd9bf0120c
16 changed files with 49 additions and 24 deletions
@@ -41,8 +41,8 @@ interface AutomationFormProps {
onClose: () => void;
}
export default function AutomationForm(props: AutomationFormProps) {
const { automation, onClose } = props;
export default function AutomationForm({ automation, onClose }: AutomationFormProps) {
'no memo'; // RHF and react-compiler dont seem to get along
const isEdit = isAutomation(automation);
const { data } = useCustomFields();
const { refetch } = useAutomationSettings();
@@ -20,8 +20,12 @@ interface AutomationSettingsProps {
oscPortIn: number;
}
export default function AutomationSettingsForm(props: AutomationSettingsProps) {
const { enabledAutomations, enabledOscIn, oscPortIn } = props;
export default function AutomationSettingsForm({
enabledAutomations,
enabledOscIn,
oscPortIn,
}: AutomationSettingsProps) {
'no memo'; // RHF and react-compiler dont seem to get along
const {
handleSubmit,
@@ -23,8 +23,15 @@ interface OntimeActionFormProps {
setValue: UseFormSetValue<AutomationDTO>;
}
export default function OntimeActionForm(props: PropsWithChildren<OntimeActionFormProps>) {
const { index, register, setValue, rowErrors, value, children, watch } = props;
export default function OntimeActionForm({
index,
register,
setValue,
rowErrors,
value,
children,
watch,
}: PropsWithChildren<OntimeActionFormProps>) {
const [selectedAction, setSelectedAction] = useState<string>(value);
const handleSetAction = (value: OntimeActionKey) => {
@@ -70,7 +77,7 @@ export default function OntimeActionForm(props: PropsWithChildren<OntimeActionFo
New time
<Input
{...register(`outputs.${index}.time`, {
required: { value: true, message: 'Required field' }, //TODO:(automation set aux) not sure what way around to have the string and where to have the ms value
required: { value: true, message: 'Required field' }, //TODO:(automation set aux) not sure what way around to have the string and where to have the ms value
})}
fluid
placeholder='eg: 10m5s'
@@ -31,6 +31,7 @@ export default function TriggerForm({
onCancel,
postSubmit,
}: TriggerFormProps) {
'use no memo'; // RHF and react-compiler don't seem to get along
const {
handleSubmit,
register,