migrate to blitzjs

This commit is contained in:
m5r
2021-07-31 22:33:18 +08:00
parent 4aa646ab43
commit fc4278ca7b
218 changed files with 19100 additions and 27038 deletions

View File

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