36 lines
1.3 KiB
TypeScript
36 lines
1.3 KiB
TypeScript
import { Link } from '@inertiajs/react';
|
|
import { Frame } from '@/pages/investment/shared';
|
|
import type { PublicOffer } from '@/lib/public-offer';
|
|
import PublicOfferCard from '@/components/public-offer-card';
|
|
import CatalogueInvestmentMap from '@/components/catalogue-investment-map';
|
|
|
|
export default function OfferPublicDetail({ offer }: { offer: PublicOffer }) {
|
|
const territoryId = offer.location.at(-1)?.id;
|
|
return (
|
|
<Frame title={offer.title} mainClassName="max-w-4xl">
|
|
<Link className="mb-5 inline-block underline" href="/ofertas">
|
|
Voltar às ofertas
|
|
</Link>
|
|
<PublicOfferCard offer={offer} detail />
|
|
<Link
|
|
className="my-4 inline-block underline"
|
|
href={`/minhas-oportunidades/ofertas/${offer.id}/denunciar`}
|
|
>
|
|
Denunciar esta oferta
|
|
</Link>
|
|
{territoryId && (
|
|
<section className="mt-6">
|
|
<h2 className="mb-3 text-xl font-semibold">
|
|
Contexto territorial
|
|
</h2>
|
|
<CatalogueInvestmentMap
|
|
points={[]}
|
|
territoryId={territoryId}
|
|
mapKind="administrative"
|
|
/>
|
|
</section>
|
|
)}
|
|
</Frame>
|
|
);
|
|
}
|