multi tenancy stuff

This commit is contained in:
m5r
2021-08-06 01:07:15 +08:00
parent b54f9ef43c
commit d20eeb0617
51 changed files with 907 additions and 2542 deletions

View File

@ -2,7 +2,7 @@ import { Direction } from "../../../db";
import usePhoneCalls from "../hooks/use-phone-calls";
export default function PhoneCallsList() {
const phoneCalls = usePhoneCalls();
const phoneCalls = usePhoneCalls()[0];
if (phoneCalls.length === 0) {
return <div>empty state</div>;
@ -13,7 +13,7 @@ export default function PhoneCallsList() {
{phoneCalls.map((phoneCall) => {
const recipient = Direction.Outbound ? phoneCall.to : phoneCall.from;
return (
<li key={phoneCall.twilioSid} className="flex flex-row justify-between py-2">
<li key={phoneCall.id} className="flex flex-row justify-between py-2">
<div>{recipient}</div>
<div>{new Date(phoneCall.createdAt).toLocaleString("fr-FR")}</div>
</li>