refactor: memoise paramseditor

This commit is contained in:
Carlos Valente
2025-06-17 21:00:13 +02:00
committed by Carlos Valente
parent 5c86914cda
commit 36062458fe
7 changed files with 27 additions and 14 deletions
@@ -1,3 +1,4 @@
import { useMemo } from 'react';
import { useSearchParams } from 'react-router-dom';
import { ProjectData, Settings } from 'ontime-types';
@@ -112,7 +113,7 @@ export default function Clock(props: ClockProps) {
const clean = clock.replace('/:/g', '');
const defaultFormat = getDefaultFormat(settings?.timeFormat);
const clockOptions = getClockOptions(defaultFormat);
const clockOptions = useMemo(() => getClockOptions(defaultFormat), [defaultFormat]);
return (
<div