mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-21 06:59:09 +00:00
refactor: memoise paramseditor
This commit is contained in:
committed by
Carlos Valente
parent
5c86914cda
commit
36062458fe
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user