Compare commits

...

2 Commits

+20 -5
View File
@@ -10,6 +10,7 @@ import { User } from "../types/User";
import { Client } from "../types/Client"; import { Client } from "../types/Client";
import { useDebounce } from "@uidotdev/usehooks"; import { useDebounce } from "@uidotdev/usehooks";
import pluralize from "../utils/pluralize"; import pluralize from "../utils/pluralize";
import ChevronRightIcon from "../components/icons/ChevronRightIcon";
function ClientsPage() { function ClientsPage() {
const [limit, setLimit] = useState(10); const [limit, setLimit] = useState(10);
@@ -95,15 +96,29 @@ function ClientsPage() {
</div> </div>
</div> </div>
</div> </div>
<div className="space-y-[1.667vw]"> <div className="space-y-[0.278vw]">
{isLoading ? ( {isLoading ? (
<div className="size-[2.222vw] m-auto text-[#7B60F3] animate-spin"> <div className="size-[2.222vw] m-auto text-[#7B60F3] animate-spin">
<SpinIcon /> <SpinIcon />
</div> </div>
) : clients?.length ? ( ) : clients?.length ? (
clients?.map(({ name }) => ( clients?.map(({ name, email, phone }) => (
<div key={name} className="aspace-y-[0.833vw]"> <div className="p-[0.278vw] border-b border-[#F6F6F6]">
<p className="caption-m font-medium opacity-40">{name}</p> <div
key={name}
className="flex justify-between items-center cursor-pointer aspace-y-[0.833vw] p-[1.111vw] hover:bg-[#F6F6F6] rounded-[0.833vw]"
>
<div className="flex flex-col gap-[0.556vw]">
<p className="button-m font-medium">{name}</p>
<div className="flex gap-[0.278vw] caption-s font-medium text-[#7D7D7D]">
<p>{phone}</p>
<p>{email ? "• " + email : ""}</p>
</div>
</div>
<div className="size-[1.389vw] text-[#7D7D7D]">
<ChevronRightIcon />
</div>
</div>
</div> </div>
)) ))
) : ( ) : (
@@ -118,7 +133,7 @@ function ClientsPage() {
</div> </div>
)} )}
</div> </div>
{!!clients?.length && clients?.length === 0 && ( {!!clients?.length && clients?.length !== 0 && (
<Button <Button
size="large" size="large"
variant="primary" variant="primary"