refactor: add scroll prop to Link
This commit is contained in:
@@ -36,7 +36,12 @@ export default async function AmenitiesList({
|
|||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
</div>
|
||||||
<Link href={"?sidepeek=amenities"} color="burgundy" variant="icon">
|
<Link
|
||||||
|
scroll={false}
|
||||||
|
href={"?sidepeek=amenities"}
|
||||||
|
color="burgundy"
|
||||||
|
variant="icon"
|
||||||
|
>
|
||||||
{formatMessage({ id: "Show all amenities" })}
|
{formatMessage({ id: "Show all amenities" })}
|
||||||
<ChevronRightIcon />
|
<ChevronRightIcon />
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ export default function Link({
|
|||||||
partialMatch = false,
|
partialMatch = false,
|
||||||
textDecoration,
|
textDecoration,
|
||||||
size,
|
size,
|
||||||
|
scroll = true,
|
||||||
prefetch,
|
prefetch,
|
||||||
variant,
|
variant,
|
||||||
...props
|
...props
|
||||||
@@ -32,6 +33,7 @@ export default function Link({
|
|||||||
})
|
})
|
||||||
return (
|
return (
|
||||||
<NextLink
|
<NextLink
|
||||||
|
scroll={scroll}
|
||||||
prefetch={prefetch}
|
prefetch={prefetch}
|
||||||
className={classNames}
|
className={classNames}
|
||||||
href={href}
|
href={href}
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ export interface LinkProps
|
|||||||
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "color">,
|
extends Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "color">,
|
||||||
VariantProps<typeof linkVariants> {
|
VariantProps<typeof linkVariants> {
|
||||||
href: string
|
href: string
|
||||||
|
scroll?: boolean
|
||||||
partialMatch?: boolean
|
partialMatch?: boolean
|
||||||
prefetch?: boolean
|
prefetch?: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user