import React, { useContext } from 'react'; import { ServerStatusContext } from '../utils/server-status-context'; export default function BroadcastInfo() { const context = useContext(ServerStatusContext); const { broadcaster } = context || {}; const { remoteAddr, time, streamDetails } = broadcaster || {}; return (
Remote Address: {remoteAddr}
Time: {(new Date(time)).toLocaleTimeString()}
Stream Details: {JSON.stringify(streamDetails)}