add user profile, profile vibe and trip vibe and social signal

This commit is contained in:
2026-05-08 19:20:27 +07:00
parent 3228ef712f
commit 7f419638b5
39 changed files with 1361 additions and 192 deletions
+41
View File
@@ -0,0 +1,41 @@
import type { Vibe } from "@/app/generated/prisma/enums";
export const VIBES = ["CHILL", "BALANCED", "HARDCORE"] as const satisfies readonly Vibe[];
interface VibeMeta {
label: string;
icon: string;
description: string;
}
const META: Record<Vibe, VibeMeta> = {
CHILL: {
label: "Chill",
icon: "😌",
description: "Santai, nikmati prosesnya, no rush.",
},
BALANCED: {
label: "Balanced",
icon: "🙂",
description: "Seimbang — ada effort, ada healing.",
},
HARDCORE: {
label: "Hardcore",
icon: "🔥",
description: "Push limit, target tercapai, full energy.",
},
};
export function vibeMeta(vibe: Vibe): VibeMeta {
return META[vibe];
}
export function vibeLabel(vibe: Vibe): string {
return META[vibe].label;
}
export function isVibe(value: unknown): value is Vibe {
return (
typeof value === "string" && (VIBES as readonly string[]).includes(value)
);
}