V2 socket store (#254)

* refactor: create socket utility
* refactor: ensure a single subscription to topics
* refactor: replace usages of socket object with subscription store handler
This commit is contained in:
Carlos Valente
2022-11-20 18:08:49 +01:00
committed by GitHub
parent edd983dfd6
commit c1f87736eb
24 changed files with 219 additions and 387 deletions
@@ -3,7 +3,7 @@ import { IoMicOffOutline } from '@react-icons/all-files/io5/IoMicOffOutline';
import { IoMicSharp } from '@react-icons/all-files/io5/IoMicSharp';
import CopyTag from '../../../common/components/osc-tag/CopyTag';
import { useMessageControlProvider } from '../../../common/hooks/useSocketProvider';
import { setMessage, useMessageControl } from '../../../common/hooks/useSocket';
import { tooltipDelayMid } from '../../../ontimeConfig';
import InputRow from './InputRow';
@@ -11,7 +11,7 @@ import InputRow from './InputRow';
import style from './MessageControl.module.scss';
export default function MessageControl() {
const { data, setMessage } = useMessageControlProvider();
const { data } = useMessageControl();
return (
<>