This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
Files
Liam b3c124631a
Some checks failed
Deploy Backend / deploy (push) Successful in 2m26s
Deploy Website / deploy (push) Failing after 1m52s
move score page fetching to the backend
2024-10-17 15:30:14 +01:00

24 lines
720 B
TypeScript

import Image from "next/image";
import Tooltip from "@/components/tooltip";
import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player";
type Props = {
player: ScoreSaberPlayer;
};
export default function PlayerBadges({ player }: Props) {
return (
<div className="flex flex-wrap gap-2 w-full items-center justify-center">
{player.badges?.map((badge, index) => {
return (
<Tooltip key={index} display={<p className="cursor-default pointer-events-none">{badge.description}</p>}>
<div>
<Image src={badge.url} alt={badge.description} width={80} height={30} unoptimized />
</div>
</Tooltip>
);
})}
</div>
);
}