mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 17:33:55 +00:00
refactor: small code cleanups
- remove compiler directives
This commit is contained in:
committed by
Carlos Valente
parent
8a7f8c8ebc
commit
9ab54edbf5
@@ -31,7 +31,6 @@ export default function TriggerForm({
|
||||
onCancel,
|
||||
postSubmit,
|
||||
}: TriggerFormProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const {
|
||||
handleSubmit,
|
||||
register,
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
|
||||
import { useState } from 'react';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import QRCode from 'react-qr-code';
|
||||
@@ -34,7 +32,6 @@ interface GenerateLinkFormOptions {
|
||||
type GenerateLinkState = 'pending' | 'loading' | 'success' | 'error';
|
||||
|
||||
export default function GenerateLinkForm({ hostOptions, pathOptions, isLockedToView }: GenerateLinkFormProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const [formState, setFormState] = useState<GenerateLinkState>('pending');
|
||||
const [url, setUrl] = useState(serverURL);
|
||||
|
||||
|
||||
@@ -32,7 +32,6 @@ export default function CustomFieldForm({
|
||||
initialLabel,
|
||||
initialKey,
|
||||
}: CustomFieldsFormProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const { data } = useCustomFields();
|
||||
|
||||
// we use this to force an update
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ export default function ImportMapForm({
|
||||
onSubmitExport,
|
||||
onSubmitImport,
|
||||
}: ImportMapFormProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const namedImportMap = getPersistedOptions();
|
||||
const { revoke } = useGoogleSheet();
|
||||
const {
|
||||
|
||||
@@ -23,7 +23,6 @@ type ProjectCreateFormValues = {
|
||||
};
|
||||
|
||||
export default function ProjectCreateForm({ onClose }: ProjectCreateFromProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
||||
const {
|
||||
|
||||
@@ -20,7 +20,6 @@ interface ProjectFormProps {
|
||||
}
|
||||
|
||||
export default function ProjectForm({ action, filename, onSubmit, onCancel }: ProjectFormProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const {
|
||||
handleSubmit,
|
||||
register,
|
||||
|
||||
@@ -28,7 +28,6 @@ type ProjectMergeFormValues = {
|
||||
};
|
||||
|
||||
export default function ProjectMergeForm({ onClose, fileName }: ProjectMergeFromProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
const queryClient = useQueryClient();
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ import * as Panel from '../../panel-utils/PanelUtils';
|
||||
import GeneralPinInput from './composite/GeneralPinInput';
|
||||
|
||||
export default function GeneralSettings() {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const { data, status, refetch } = useSettings();
|
||||
const {
|
||||
handleSubmit,
|
||||
|
||||
@@ -18,7 +18,6 @@ import * as Panel from '../../panel-utils/PanelUtils';
|
||||
import style from './SettingsPanel.module.scss';
|
||||
|
||||
export default function ProjectData() {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const { data, status } = useProjectData();
|
||||
const { updateProjectData } = useUpdateProjectData();
|
||||
|
||||
|
||||
@@ -18,7 +18,6 @@ import CodeEditorModal from './composite/StyleEditorModal';
|
||||
const cssOverrideDocsUrl = 'https://docs.getontime.no/features/custom-styling/';
|
||||
|
||||
export default function ViewSettings() {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const { data, isPending, mutateAsync } = useViewSettings();
|
||||
const [isCodeEditorOpen, codeEditorHandler] = useDisclosure();
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ interface QuickStartProps {
|
||||
}
|
||||
|
||||
export default function QuickStart({ isOpen, onClose }: QuickStartProps) {
|
||||
'use no memo'; // RHF and react-compiler don't seem to get along
|
||||
const { defaultWarnTime, defaultDangerTime, setDangerTime, setWarnTime } = useEditorSettings();
|
||||
|
||||
const {
|
||||
|
||||
Reference in New Issue
Block a user