diff --git a/app/phone-calls/components/phone-calls-list.tsx b/app/phone-calls/components/phone-calls-list.tsx index b967e10..539979e 100644 --- a/app/phone-calls/components/phone-calls-list.tsx +++ b/app/phone-calls/components/phone-calls-list.tsx @@ -1,4 +1,5 @@ import { useEffect } from "react"; +import { Link, Routes } from "blitz"; import { HiPhoneMissedCall, HiPhoneIncoming, HiPhoneOutgoing } from "react-icons/hi"; import clsx from "clsx"; @@ -34,27 +35,39 @@ export default function PhoneCallsList() { const isOutboundCall = phoneCall.direction === Direction.Outbound; const isInboundCall = phoneCall.direction === Direction.Inbound; const isMissedCall = isInboundCall && phoneCall.status === CallStatus.NoAnswer; - const recipient = isOutboundCall + const formattedRecipient = isOutboundCall ? phoneCall.toMeta.formattedPhoneNumber : phoneCall.fromMeta.formattedPhoneNumber; + const recipient = isOutboundCall ? phoneCall.to : phoneCall.from; + return ( -