added event helpers to ui libary, added Badge component, reordered Dashboard Components, splitted Event Admin page
This commit is contained in:
28
apps/hub/app/(app)/_components/Badges.tsx
Normal file
28
apps/hub/app/(app)/_components/Badges.tsx
Normal file
@@ -0,0 +1,28 @@
|
||||
import { Badge } from "@repo/ui";
|
||||
|
||||
import { Award } from "lucide-react";
|
||||
import { getServerSession } from "../../api/auth/[...nextauth]/auth";
|
||||
|
||||
export const Badges = async () => {
|
||||
const session = await getServerSession();
|
||||
if (!session) return null;
|
||||
|
||||
return (
|
||||
<div className="card bg-base-200 shadow-xl mb-4 col-span-6 xl:col-span-3">
|
||||
<div className="card-body">
|
||||
<h2 className="card-title justify-between">
|
||||
<span className="card-title">
|
||||
<Award className="w-4 h-4" /> Verdiente Abzeichen
|
||||
</span>
|
||||
</h2>
|
||||
{session.user.badges.map((badge) => {
|
||||
return (
|
||||
<div className="badge badge-primary badge-outline">
|
||||
<Badge name={badge} />
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in New Issue
Block a user