Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

Add scroll prop to links.

Mike Cao435e6a155d76
diff --git a/src/app/(main)/websites/[id]/WebsiteMenuView.js b/src/app/(main)/websites/[id]/WebsiteMenuView.js
index 00b218f47..c501645a4 100644
--- a/src/app/(main)/websites/[id]/WebsiteMenuView.js
+++ b/src/app/(main)/websites/[id]/WebsiteMenuView.js
@@ -116,7 +116,7 @@ export default function WebsiteMenuView({ websiteId, websiteDomain }) {
return (
<div className={styles.layout}>
<div className={styles.menu}>
- <LinkButton href={pathname} className={styles.back} variant="quiet">
+ <LinkButton href={pathname} className={styles.back} variant="quiet" scroll={false}>
<Icon rotate={180}>
<Icons.ArrowRight />
</Icon>
diff --git a/src/components/common/LinkButton.js b/src/components/common/LinkButton.js
index 6ae593007..a9a8562db 100644
--- a/src/components/common/LinkButton.js
+++ b/src/components/common/LinkButton.js
@@ -3,7 +3,7 @@ import Link from 'next/link';
import { useLocale } from 'components/hooks';
import styles from './LinkButton.module.css';
-export function LinkButton({ href, className, variant, children }) {
+export function LinkButton({ href, className, variant, scroll = true, children }) {
const { dir } = useLocale();
return (
@@ -11,6 +11,7 @@ export function LinkButton({ href, className, variant, children }) {
className={classNames(styles.button, className, { [styles[variant]]: true })}
href={href}
dir={dir}
+ scroll={scroll}
>
{children}
</Link>