1
0
mirror of https://github.com/Fayorg/calendrier-avant.git synced 2026-05-27 17:18:38 +02:00

add: auto-refresh on the results pages

This commit is contained in:
2023-12-18 16:17:29 +01:00
parent 8ca5133527
commit 25ec9c2e50
3 changed files with 81 additions and 49 deletions

View File

@@ -1,32 +1,32 @@
"use client"
'use client';
import {Santa} from "@components/custom/santa";
import { Santa } from '@components/custom/santa';
interface ChartProps {
data: {
name: string
total: number
}[]
data: {
name: string;
total: number;
}[];
}
export function Chart({...props}: ChartProps) {
return (
<div className={"text-[#F0F0F0] flex-1 flex items-end"}>
<div className={"w-full"}>
<div className={"flex flex-row justify-between w-full items-end"}>
{props.data.map((item, index) => (
<Santa height={item.total} key={index}/>
))}
</div>
<div className={"flex flex-row justify-between w-full items-end mt-2"}>
{props.data.map((item, index) => (
<div className={"w-[100px] h-fit flex flex-col items-center"} key={index}>
<div className={"h-[14px] w-[3pt] bg-white"}/>
<span className={""}>{item.name}</span>
</div>
))}
</div>
</div>
</div>
)
export function Chart({ ...props }: ChartProps) {
return (
<div className={'text-[#F0F0F0] flex-1 flex items-end'}>
<div className={'w-full'}>
<div className={'flex flex-row justify-between w-full items-end'}>
{props.data.map((item, index) => (
<Santa height={item.total} key={index} />
))}
</div>
<div className={'flex flex-row justify-between w-full items-end mt-2'}>
{props.data.map((item, index) => (
<div className={'w-[100px] h-fit flex flex-col items-center'} key={index}>
<div className={'h-[14px] w-[3pt] bg-white'} />
<span className={''}>{item.name}</span>
</div>
))}
</div>
</div>
</div>
);
}