From b0090a2fba6e4f06c814319a0eff35b5cc0c8dd1 Mon Sep 17 00:00:00 2001 From: cv <34649812+cpvalente@users.noreply.github.com> Date: Sat, 2 Sep 2023 13:22:44 +0200 Subject: [PATCH] refactor: memo event line --- .../src/features/operator/operator-event/OperatorEvent.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx index 206fcbd0a..2fd06d21e 100644 --- a/apps/client/src/features/operator/operator-event/OperatorEvent.tsx +++ b/apps/client/src/features/operator/operator-event/OperatorEvent.tsx @@ -1,4 +1,4 @@ -import { RefObject } from 'react'; +import { memo, RefObject } from 'react'; import DelayIndicator from '../../../common/components/delay-indicator/DelayIndicator'; import { useTimer } from '../../../common/hooks/useSocket'; @@ -30,7 +30,7 @@ function RollingTime() { return <>{formatTime(timer.current, { showSeconds: true, format: 'hh:mm:ss' })}; } -export default function OperatorEvent(props: OperatorEventProps) { +function OperatorEvent(props: OperatorEventProps) { const { colour, cue, @@ -88,3 +88,5 @@ export default function OperatorEvent(props: OperatorEventProps) { ); } + +export default memo(OperatorEvent);