|
|
|
@ -3,6 +3,7 @@ |
|
|
|
import Image from "next/image"; |
|
|
|
import { useRouter } from "next/navigation"; |
|
|
|
import { useEffect, useMemo } from "react"; |
|
|
|
import { useHardwareBackHandler } from "@/hooks/use-hardware-back-handler"; |
|
|
|
import { useHabibWebReady } from "@/hooks/use-habib-web-ready"; |
|
|
|
import { Ic } from "@/icons"; |
|
|
|
import AdvisorActionsCard from "@/components/Componentes/advisor-actions-card"; |
|
|
|
@ -38,6 +39,14 @@ export default function FindingMatchClient() { |
|
|
|
const { mutate: markRejectionSeen, isPending: isMarkingSeen } = |
|
|
|
useRejectionSeenMutation(); |
|
|
|
|
|
|
|
useHardwareBackHandler(() => { |
|
|
|
if (isAdvisorOpen) { |
|
|
|
closeAdvisors(); |
|
|
|
return true; |
|
|
|
} |
|
|
|
return false; // Hardware back closes the service in Flutter
|
|
|
|
}); |
|
|
|
|
|
|
|
useEffect(() => { |
|
|
|
if (!profile) { |
|
|
|
return; |
|
|
|
@ -86,9 +95,24 @@ export default function FindingMatchClient() { |
|
|
|
|
|
|
|
<main |
|
|
|
style={{ paddingBottom: "calc(100px + var(--safe-bottom))" }} |
|
|
|
className="-mx-[17px] flex min-h-screen flex-col px-[23px] pt-[max(12px,calc(var(--safe-top)+4px))] text-center" |
|
|
|
className="-mx-[17px] flex min-h-screen flex-col px-[23px] pt-[max(12px,calc(var(--safe-top)+4px))] text-center page-slide-enter" |
|
|
|
> |
|
|
|
<PageHeader className="-mx-[6px]" /> |
|
|
|
<PageHeader |
|
|
|
className="-mx-[6px]" |
|
|
|
profile={profile} |
|
|
|
leftButton={{ |
|
|
|
icon: "back", |
|
|
|
onClick: () => { |
|
|
|
if (typeof window !== "undefined" && (window as any).HabibApp) { |
|
|
|
(window as any).HabibApp.postMessage( |
|
|
|
JSON.stringify({ action: "close_service" }), |
|
|
|
); |
|
|
|
} else { |
|
|
|
router.push(localizePath("/", locale)); |
|
|
|
} |
|
|
|
}, |
|
|
|
}} |
|
|
|
/> |
|
|
|
|
|
|
|
<section className="mt-20 flex flex-1 flex-col items-center"> |
|
|
|
<div className="relative h-[124px] w-[130px]" aria-hidden="true"> |
|
|
|
@ -173,7 +197,10 @@ export default function FindingMatchClient() { |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
) : ( |
|
|
|
<Button variant="dark" href="/questions-list"> |
|
|
|
<Button |
|
|
|
variant="dark" |
|
|
|
href={localizePath("/questions-list", locale)} |
|
|
|
> |
|
|
|
<Ic name="pencil" aria-hidden="true" className="h-3.5 w-3.5 shrink-0" /> |
|
|
|
<span>{copy.editProfile}</span> |
|
|
|
</Button> |
|
|
|
|