mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-31 20:09:11 +00:00
refactor: rename external message to secondary message
This commit is contained in:
committed by
Carlos Valente
parent
0aeec12ccd
commit
3cd6cd2f55
@@ -1,4 +1,5 @@
|
||||
import { Button } from '@chakra-ui/react';
|
||||
import { SecondarySource } from 'ontime-types';
|
||||
|
||||
import { setMessage, useTimerViewControl } from '../../../common/hooks/useSocket';
|
||||
|
||||
@@ -9,7 +10,7 @@ import style from './MessageControl.module.scss';
|
||||
export default function TimerControlsPreview() {
|
||||
const { blackout, blink, secondarySource } = useTimerViewControl();
|
||||
|
||||
const toggleSecondary = (newValue: 'aux' | 'external' | null) => {
|
||||
const toggleSecondary = (newValue: SecondarySource) => {
|
||||
if (secondarySource === newValue) {
|
||||
setMessage.timerSecondary(null);
|
||||
} else {
|
||||
@@ -31,10 +32,10 @@ export default function TimerControlsPreview() {
|
||||
</Button>
|
||||
<Button
|
||||
size='sm'
|
||||
variant={secondarySource === 'external' ? 'ontime-filled' : 'ontime-subtle'}
|
||||
onClick={() => toggleSecondary('external')}
|
||||
variant={secondarySource === 'secondary' ? 'ontime-filled' : 'ontime-subtle'}
|
||||
onClick={() => toggleSecondary('secondary')}
|
||||
>
|
||||
Show external
|
||||
Show secondary
|
||||
</Button>
|
||||
|
||||
<hr className={style.divider} />
|
||||
|
||||
Reference in New Issue
Block a user