Skip to content

Commit

Permalink
use +keepScrollPosition
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Sep 25, 2024
1 parent 648f3d1 commit 1a4484f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 0 additions & 5 deletions examples/full/pages/stardust/+Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,6 @@ function Layout(props: FlowProps) {
);
}

function Link(props: any) {
// We set `keep-scroll-position` to tell Vike to preserve the current scroll position
return <a keep-scroll-position="" style={{ marginRight: 10, ...props.style }} {...props} />;
}

function Counter() {
const [count, setCount] = createSignal(0);
return (
Expand Down
3 changes: 1 addition & 2 deletions examples/full/pages/starship/+Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ function Layout(props: FlowProps) {
}

function Link(props: any) {
// We set `keep-scroll-position` to tell Vike to preserve the current scroll position
return <a keep-scroll-position="" style={{ marginRight: 10, ...props.style }} {...props} />;
return <a style={{ marginRight: 10, ...props.style }} {...props} />;
}

function Counter() {
Expand Down
6 changes: 6 additions & 0 deletions examples/full/pages/starship/+config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import type { Config } from "vike/types";

export default {
// https://vike.dev/keepScrollPosition
keepScrollPosition: true,
} satisfies Config;

0 comments on commit 1a4484f

Please sign in to comment.