Skip to content

Commit

Permalink
Fix scroll to contact behavior for mobile.
Browse files Browse the repository at this point in the history
  • Loading branch information
theruther4d committed Jul 27, 2021
1 parent 5a23636 commit 6ff9cf6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions src/history/History.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ export function History() {
const getInTouch = (event: MouseEvent) => {
try {
const section = document.getElementById(contactId);
window.scroll({
top: section!.getBoundingClientRect().top,
section?.scrollIntoView({
behavior: "smooth",
});
event.preventDefault();
Expand Down
1 change: 0 additions & 1 deletion todo.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

## General

- downloadable pdf link
- clean up repetitive styling for sections

## Contributions
Expand Down

1 comment on commit 6ff9cf6

@vercel
Copy link

@vercel vercel bot commented on 6ff9cf6 Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.