general destination and verify

This commit is contained in:
2026-05-08 18:23:51 +07:00
parent 2de8ac4086
commit 63349a144d
21 changed files with 2535 additions and 56 deletions
+22 -1
View File
@@ -7,6 +7,7 @@ import { authOptions } from "@/lib/auth";
import { profileService } from "@/server/services/profile.service";
import { TripCard } from "@/features/trip/components/trip-card";
import { ProfileTripRow } from "@/features/profile/components/profile-trip-row";
import { ProfileEditor } from "@/features/profile/components/profile-editor";
export const metadata: Metadata = {
title: "Profil Saya",
@@ -19,7 +20,10 @@ export default async function ProfilePage() {
redirect("/login?callbackUrl=/profile");
}
const data = await profileService.getProfileDashboard(session.user.id);
const [data, ownProfile] = await Promise.all([
profileService.getProfileDashboard(session.user.id),
profileService.getOwnProfile(session.user.id),
]);
const {
user,
isVerifiedOrganizer,
@@ -80,6 +84,23 @@ export default async function ProfilePage() {
</Link>
</div>
{/* Profil sosial publik */}
<div className="mb-6">
<ProfileEditor
userId={user.id}
initial={
ownProfile
? {
bio: ownProfile.bio,
city: ownProfile.city,
interests: ownProfile.interests,
instagram: ownProfile.instagram,
}
: null
}
/>
</div>
{/* Trip selesai — akses ulasan (trip ini tidak muncul di Open Trip) */}
{reviewable.length > 0 && (
<section className="mb-8 rounded-2xl border border-amber-200 bg-amber-50/60 p-4 sm:p-5">