chore(release): 0.4.0
This commit is contained in:
@@ -33,7 +33,13 @@ export async function registerAction(formData: FormData) {
|
||||
}
|
||||
}
|
||||
|
||||
export async function acceptTermsAction() {
|
||||
export async function acceptTermsAction(input: { accepted: boolean }) {
|
||||
if (input?.accepted !== true) {
|
||||
return {
|
||||
error:
|
||||
"Kamu harus mencentang persetujuan Syarat & Ketentuan dan Kebijakan Privasi",
|
||||
};
|
||||
}
|
||||
const session = await getServerSession(authOptions);
|
||||
if (!session?.user) {
|
||||
return { error: "Kamu harus login terlebih dahulu" };
|
||||
|
||||
@@ -17,6 +17,7 @@ interface TripCardProps {
|
||||
status: string;
|
||||
coverImage?: string | null;
|
||||
priority?: boolean;
|
||||
isVerifiedOrganizer?: boolean;
|
||||
}
|
||||
|
||||
export function TripCard({
|
||||
@@ -33,8 +34,10 @@ export function TripCard({
|
||||
status,
|
||||
coverImage,
|
||||
priority,
|
||||
isVerifiedOrganizer,
|
||||
}: TripCardProps) {
|
||||
const spotsLeft = maxParticipants - participantCount;
|
||||
const isSmallGroup = maxParticipants <= 10;
|
||||
|
||||
return (
|
||||
<Link href={`/trips/${id}`} className="group block">
|
||||
@@ -83,9 +86,25 @@ export function TripCard({
|
||||
<span className="text-xs text-secondary-500">📅</span>{" "}
|
||||
{formatTripCalendarDateRangeLong(date, endDate)}
|
||||
</div>
|
||||
<div className="flex items-center gap-1.5">
|
||||
<div className="flex flex-wrap items-center gap-1.5">
|
||||
<span className="text-xs text-secondary-500">👤</span>{" "}
|
||||
{organizerName}
|
||||
<span className="truncate">{organizerName}</span>
|
||||
{isVerifiedOrganizer && (
|
||||
<span
|
||||
className="inline-flex items-center gap-0.5 rounded-full bg-primary-100 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wide text-primary-800"
|
||||
title="Identitas organizer telah diverifikasi (KTP & rekening)"
|
||||
>
|
||||
✅ Verified
|
||||
</span>
|
||||
)}
|
||||
{isSmallGroup && (
|
||||
<span
|
||||
className="inline-flex items-center rounded-full bg-secondary-100 px-1.5 py-0.5 text-[10px] font-bold uppercase tracking-wide text-secondary-800"
|
||||
title="Grup kecil — pengalaman lebih akrab"
|
||||
>
|
||||
Small group
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user