Merge pull request 'Display the dish with the color of the group' (#86) from color-dishes into main
Some checks failed
Check usage of free licenses / build-static-assets (push) Failing after 31s
Build Nginx-based docker image / build-static-assets (push) Failing after 31s
Playwright Tests / test (push) Failing after 32s

Reviewed-on: #86
This commit is contained in:
bustikiller 2024-11-04 08:04:45 +00:00
commit c86018a24b
2 changed files with 5 additions and 1 deletions

View File

@ -22,6 +22,7 @@ export type Guest = {
id: string; id: string;
name: string; name: string;
group_name?: string; group_name?: string;
color?: string;
status?: 'Considered' | 'Invited' | 'Confirmed' | 'Declined' | 'Tentative'; status?: 'Considered' | 'Invited' | 'Confirmed' | 'Declined' | 'Tentative';
} }

View File

@ -5,7 +5,10 @@ import { Guest } from "@/app/lib/definitions";
function Dish({ guest, rotation }: { guest: Guest, rotation?: number }) { function Dish({ guest, rotation }: { guest: Guest, rotation?: number }) {
rotation = rotation || 0 rotation = rotation || 0
return ( return (
<div className={`m-3 w-24 h-24 rounded-full bg-cyan-100 content-center text-center cursor-default`} style={{ rotate: `${360 - rotation}deg` }}> <div className={`m-3 w-24 h-24 rounded-full content-center text-center cursor-default`} style={{
rotate: `${360 - rotation}deg`,
backgroundColor: guest.color,
}}>
{guest.name} {guest.name}
</div> </div>
) )