Skip to content

Commit

Permalink
Enable smooth scrolling for home page
Browse files Browse the repository at this point in the history
  • Loading branch information
ost-ptk committed Nov 29, 2024
1 parent f9fc016 commit 623eebe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export const DeploysList = () => {
container?.scrollTo(0, Number(position));
localStorage.removeItem('activityPlateYPosition');
} else {
container?.scrollTo(0, 0);
container?.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
}
}, []);

Expand Down
2 changes: 1 addition & 1 deletion src/apps/popup/pages/home/components/nft-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const NftList = () => {
container?.scrollTo(0, Number(position));
localStorage.removeItem('nftTokenYPosition');
} else {
container?.scrollTo(0, 0);
container?.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
}
}, []);

Expand Down
2 changes: 1 addition & 1 deletion src/apps/popup/pages/home/components/tokens-list/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const TokensList = () => {
useEffect(() => {
const container = document.querySelector('#ms-container');

container?.scrollTo(0, 0);
container?.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
}, []);

return (
Expand Down
2 changes: 1 addition & 1 deletion src/apps/popup/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function HomePageContent() {
if (!state?.activeTabId) {
const container = document.querySelector('#ms-container');

container?.scrollTo(0, 0);
container?.scrollTo({ top: 0, left: 0, behavior: 'smooth' });
}
}, [state?.activeTabId]);

Expand Down

0 comments on commit 623eebe

Please sign in to comment.