import type { NextPage } from "next"; import Layout from "../components/layout"; import ConnectedLayout from "../components/connected-layout"; import { useAtom } from "jotai"; import { phoneCallsAtom } from "../state"; type Props = {}; const pageTitle = "Calls"; const Calls: NextPage = () => { const phoneCalls = useAtom(phoneCallsAtom)[0] ?? []; return (

Calls page

    {phoneCalls.map((phoneCall) => { const recipient = phoneCall.direction === "outbound" ? phoneCall.to : phoneCall.from; return (
  • {recipient}
    {new Date(phoneCall.createdAt).toLocaleString("fr-FR")}
  • ) })}
); }; export default Calls;