Add Photos onboarding step; let pending/rejected users re-edit freely
- New /onboarding/photos step (upload/delete grid, needs >=1 photo to continue), inserted as step 2 right after basic info. - Pending screen gets an "edit your info" entry point into the wizard; Rejected screen's edit button now goes there too instead of just the read-only profile page. - Step 1's back button now returns to /home instead of /login when the user is already onboarded (was previously always /login). - Progress bar segments become clickable to jump directly to any step once the user is already onboarded. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { Bell, HourglassIcon, XCircle, SlidersHorizontal, Heart } from "lucide-react";
|
||||
import { Bell, HourglassIcon, XCircle, SlidersHorizontal, Heart, Pencil } from "lucide-react";
|
||||
import { EmptyState } from "@/components/ui/EmptyState";
|
||||
import { Badge } from "@/components/ui/Badge";
|
||||
import { Button } from "@/components/ui/Button";
|
||||
@@ -28,6 +28,7 @@ function BrandHeader() {
|
||||
}
|
||||
|
||||
function PendingReview() {
|
||||
const router = useRouter();
|
||||
const { refreshUser } = useAuth();
|
||||
const [checking, setChecking] = useState(false);
|
||||
const intervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
||||
@@ -64,6 +65,14 @@ function PendingReview() {
|
||||
actionLabel={checking ? "در حال بررسی..." : "بررسی وضعیت"}
|
||||
onAction={handleCheck}
|
||||
/>
|
||||
<Button
|
||||
variant="ghost"
|
||||
size="sm"
|
||||
icon={<Pencil size={14} />}
|
||||
onClick={() => router.push("/onboarding/basic-info")}
|
||||
>
|
||||
هنوز وقت هست؛ اطلاعاتت رو ویرایش کن
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
@@ -90,7 +99,7 @@ function Rejected({ reason }: { reason?: string }) {
|
||||
<p className="text-[14px] text-(--color-content-secondary) leading-6">{reason}</p>
|
||||
)}
|
||||
</div>
|
||||
<Button size="sm" onClick={() => router.push("/profile")}>
|
||||
<Button size="sm" onClick={() => router.push("/onboarding/basic-info")}>
|
||||
ویرایش پروفایل
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user