add user profile, profile vibe and trip vibe and social signal
This commit is contained in:
+41
@@ -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)
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user