Manuel Bustillo 25703098d1
All checks were successful
Check usage of free licenses / build-static-assets (pull_request) Successful in 1m47s
Add copyright notice / copyright_notice (pull_request) Successful in 3m4s
Playwright Tests / test (pull_request) Successful in 6m8s
Build Nginx-based docker image / build-static-assets (pull_request) Successful in 11m35s
Check usage of free licenses / build-static-assets (push) Successful in 1m34s
Playwright Tests / test (push) Successful in 4m30s
Build Nginx-based docker image / build-static-assets (push) Successful in 17m58s
Add copyright notice
2024-10-27 21:11:45 +00:00

67 lines
2.2 KiB
TypeScript

/* Copyright (C) 2024 Manuel Bustillo*/
import { ArrowPathIcon } from '@heroicons/react/24/outline';
import clsx from 'clsx';
import Image from 'next/image';
import { lusitana } from '@/app/ui/fonts';
import { LatestInvoice } from '@/app/lib/definitions';
export default async function Latestguests({
latestguests,
}: {
latestguests: LatestInvoice[];
}) {
return (
<div className="flex w-full flex-col md:col-span-4">
<h2 className={`${lusitana.className} mb-4 text-xl md:text-2xl`}>
Latest guests
</h2>
<div className="flex grow flex-col justify-between rounded-xl bg-gray-50 p-4">
{/* NOTE: Uncomment this code in Chapter 7 */}
{/* <div className="bg-white px-6">
{latestguests.map((invoice, i) => {
return (
<div
key={invoice.id}
className={clsx(
'flex flex-row items-center justify-between py-4',
{
'border-t': i !== 0,
},
)}
>
<div className="flex items-center">
<Image
src={invoice.image_url}
alt={`${invoice.name}'s profile picture`}
className="mr-4 rounded-full"
width={32}
height={32}
/>
<div className="min-w-0">
<p className="truncate text-sm font-semibold md:text-base">
{invoice.name}
</p>
<p className="hidden text-sm text-gray-500 sm:block">
{invoice.email}
</p>
</div>
</div>
<p
className={`${lusitana.className} truncate text-sm font-medium md:text-base`}
>
{invoice.amount}
</p>
</div>
);
})}
</div> */}
<div className="flex items-center pb-2 pt-6">
<ArrowPathIcon className="h-5 w-5 text-gray-500" />
<h3 className="ml-2 text-sm text-gray-500 ">Updated just now</h3>
</div>
</div>
</div>
);
}