import React from 'react' import { useAppSelector } from '@/app/hooks' import type { SignalingMessage } from '@/types' import { Message } from './Message' const SIGNALING_COLORS: { [key: string]: string } = { websocket: '#00ff00', datachannel: '#ff00ff', } const Label: React.FC<{ text: string }> = (props) => { const { text } = props const color = Object.keys(SIGNALING_COLORS).includes(text) ? SIGNALING_COLORS[text] : undefined return ( [{text}] ) } const Collapse: React.FC = (props) => { const { data, type, timestamp, transportType } = props const label = transportType ?