Updated because of the default use
This commit is contained in:
@@ -4,6 +4,7 @@ import {levelCalculator} from "@/resources/level";
|
|||||||
import clsx from "clsx";
|
import clsx from "clsx";
|
||||||
import LevelLabel from "./LevelLabel";
|
import LevelLabel from "./LevelLabel";
|
||||||
import LevelProgressBar from "./LevelProgressBar";
|
import LevelProgressBar from "./LevelProgressBar";
|
||||||
|
import {Avatar} from "primereact/avatar";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
user: User;
|
user: User;
|
||||||
@@ -15,8 +16,11 @@ export default function ProfileLevel({user, className}: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={clsx("flex flex-col items-center justify-center gap-4", className)}>
|
<div className={clsx("flex flex-col items-center justify-center gap-4", className)}>
|
||||||
<div className="w-24 rounded-full">
|
<div className="w-16 md:w-24 h-16 md:h-24 rounded-full">
|
||||||
<img src={user.profilePicture} alt="Profile picture" className="rounded-full" />
|
{user.profilePicture.length > 0 && <img src={user.profilePicture} alt="Profile picture" className="rounded-full" />}
|
||||||
|
{user.profilePicture.length === 0 && (
|
||||||
|
<Avatar size="xlarge" style={{width: "100%", height: "100%"}} label={user.name.slice(0, 1)} shape="circle" />
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-1 items-center">
|
<div className="flex flex-col gap-1 items-center">
|
||||||
<LevelLabel experience={user.experience} />
|
<LevelLabel experience={user.experience} />
|
||||||
|
|||||||
Reference in New Issue
Block a user