From 0abac20c6c6f6527b715d82fbf6ea77677fd6cfd Mon Sep 17 00:00:00 2001 From: m5r Date: Sat, 25 Sep 2021 07:40:11 +0800 Subject: [PATCH] empty state for calls --- app/phone-calls/components/empty-calls.tsx | 33 +++++++++++++++++++ .../components/phone-calls-list.tsx | 3 +- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 app/phone-calls/components/empty-calls.tsx diff --git a/app/phone-calls/components/empty-calls.tsx b/app/phone-calls/components/empty-calls.tsx new file mode 100644 index 0000000..ec62ed5 --- /dev/null +++ b/app/phone-calls/components/empty-calls.tsx @@ -0,0 +1,33 @@ +import { Link, Routes } from "blitz"; +import { HiPlus } from "react-icons/hi"; + +export default function EmptyMessages() { + return ( +
+ +

No phone calls

+

Get started by calling someone you know.

+
+ + + + +
+
+ ); +} diff --git a/app/phone-calls/components/phone-calls-list.tsx b/app/phone-calls/components/phone-calls-list.tsx index 99b18f9..244c22f 100644 --- a/app/phone-calls/components/phone-calls-list.tsx +++ b/app/phone-calls/components/phone-calls-list.tsx @@ -4,6 +4,7 @@ import clsx from "clsx"; import { Direction } from "../../../db"; import PhoneInitLoader from "../../core/components/phone-init-loader"; +import EmptyCalls from "../components/empty-calls"; import usePhoneCalls from "../hooks/use-phone-calls"; import { formatRelativeDate } from "../../core/helpers/date-formatter"; @@ -22,7 +23,7 @@ export default function PhoneCallsList() { } if (phoneCalls.length === 0) { - return
empty state
; + return ; } return (