fix: card property href
This commit is contained in:
parent
1acb297818
commit
6fbbb73e05
@ -8,6 +8,7 @@ type CardPropertyProps = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export default function CardProperty({ data }: CardPropertyProps) {
|
export default function CardProperty({ data }: CardPropertyProps) {
|
||||||
|
const href = data?.propertyType === "sell" ? `/listings-for-rent/${data.slug}` : `/listings-for-sell/${data.slug}`;
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<article className="product-classic">
|
<article className="product-classic">
|
||||||
@ -36,7 +37,7 @@ export default function CardProperty({ data }: CardPropertyProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<h4 className="product-classic-title">
|
<h4 className="product-classic-title">
|
||||||
<Link href="/listings-for-rent/slug">{data.title}</Link>
|
<Link href={href}>{data.title}</Link>
|
||||||
</h4>
|
</h4>
|
||||||
<div className="product-classic-divider"></div>
|
<div className="product-classic-divider"></div>
|
||||||
<ul className="product-classic-list">
|
<ul className="product-classic-list">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user