import React, { useState, useEffect, useRef } from "react"; import { Link, useNavigate } from 'react-router-dom' import SystemCard from "../System/SystemCard"; import "./Main.css"; import { createMedia } from "@artsy/fresnel"; import { Button, Container, Divider, Grid, Header, Icon, Menu, Segment, Sidebar, Transition, } from 'semantic-ui-react' import { useDispatch } from 'react-redux' import { useGetSystemsQuery } from "../features/api/apiSlice"; /* Responsive component was removed from Semantic UI. This is discussed here: https://github.com/Semantic-Org/Semantic-UI-React/pull/4008 */ const AppMedia = createMedia({ breakpoints: { mobile: 320, tablet: 768, computer: 992, largeScreen: 1200, widescreen: 1920 } }); const mediaStyles = AppMedia.createMediaStyle(); const { Media } = AppMedia; /* eslint-disable react/no-multi-comp */ /* Heads up! HomepageHeading uses inline styling, however it's not the best practice. Use CSS or styled components for * such things. */ const HomepageHeading = ({ mobile }) => (
) /* HomepageHeading.propTypes = { mobile: PropTypes.bool, } */ /* Heads up! * Neither Semantic UI nor Semantic UI React offer a responsive navbar, however, it can be implemented easily. * It can be more complicated, but you can create really flexible markup. */ /* General flow: - componentDidMount(): it will call fetchSystem() this will perform an HTTP request if Systems does not exist, and then add System to Props */ const DesktopContainer = (props) => { const [fixed, setFixed] = useState(false); const hideFixedMenu = () => setFixed(false) const showFixedMenu = () => setFixed(true) const { children } = props return (
{process.env.REACT_APP_SITE_NAME}
Listen Events About
{children}
) } /* DesktopContainer.propTypes = { children: PropTypes.node, } */ const MobileContainer = (props) => { const [sidebarOpened, setSidebarOpened] = useState(false); const handlePusherClick = () => { setSidebarOpened(!sidebarOpened) } const handleToggle = () => setSidebarOpened(!sidebarOpened) const { children } = props return ( Home Systems About
{process.env.REACT_APP_SITE_NAME}
{children}
) } /* MobileContainer.propTypes = { children: PropTypes.node, } */ const ResponsiveContainer = ({ children }) => (
{children} {children}
) // ---------------------------------------------------- const Main = (props) => { const [visible, setVisible] = useState(true); const [currentSystem, setCurrentSystem] = useState(0); const navigate = useNavigate(); const {data:systems, isSuccess} = useGetSystemsQuery(); //= selectAllSystems(); function useInterval(callback, delay) { const savedCallback = useRef(); // Remember the latest callback. useEffect(() => { savedCallback.current = callback; }, [callback]); // Set up the interval. useEffect(() => { function tick() { savedCallback.current(); } if (delay !== null) { let id = setInterval(tick, delay); return () => clearInterval(id); } }, [delay]); } const advanceSystem = () => { if (isSuccess) { let nextSystem = currentSystem + 1; if (nextSystem > systems.systems.length) { nextSystem = 0; } setCurrentSystem(nextSystem); setVisible(!visible); } //this.setState({ visible: !this.state.visible, currentSystem }); } useInterval( ()=>{ advanceSystem()}, 3000) //https://stackoverflow.com/questions/36559661/how-can-i-dispatch-from-child-components-in-react-redux //https://stackoverflow.com/questions/42597602/react-onclick-pass-event-with-parameter let system = false; if (isSuccess) { system = systems.systems[currentSystem]; } return ( <>
{ system && ( navigate("/system/" + system.shortName)}/> )}
All The Calls

Every call, on every talkgroup is recorded

Go back in time

Missed a call? Not a problem, everything is archived!

Don't just scan, hear it all!

Most large cities use trunked radio systems to get the most use out of their assigned radio spectrum. With trunked systems, the transmission are constantly hopping to different frequencies. Using a cheap Software Defined Radio (SDR), it is possible capture all of the transmission on a system. Instead of scanning to a single frequency, SDR capturea wide swathes of spectrum, covering all of the frequencies a system could use.

Get Involved
Want to record your local radio system?

Join us! Record a local radio system and share it with the world. If you have a spare computer, it is easy to get started. With a $25 SDR or two, you can capture an entire system. It does take a little bit of work to get things setup, but we are here to help and answer questions.

The End
); } export default Main;