Skip to content

Commit

Permalink
Scroll to ID, not by height
Browse files Browse the repository at this point in the history
  • Loading branch information
TyHil committed Apr 27, 2024
1 parent 0b67eab commit d6f1146
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/WhoWeAre.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
function WhoWeAre() {
return (
<div className="xl:pt-32 px-8 md:px-32 xl:px-64 flex justify-between flex-col lg:flex-row mx-auto font-inter gap-8 lg:gap-16 lg:text-left text-center my-16">
<div
id="who-we-are"
className="xl:pt-32 px-8 md:px-32 xl:px-64 flex justify-between flex-col lg:flex-row mx-auto font-inter gap-8 lg:gap-16 lg:text-left text-center my-16"
>
<h1 className="font-bold lg:text-6xl text-2xl text-gradient leading-tight">
Who&nbsp;We Are
</h1>
Expand Down
5 changes: 4 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ import CTA from '@/components/CTA';
import Testimonials from '@/components/Testimonials';
import Projects from '@/components/Projects';
import Head from 'next/head';
import { useRouter } from 'next/router';

const Header = () => {
const router = useRouter();

const [frames, bgStyles] = useBlobBg();

return (
Expand Down Expand Up @@ -45,7 +48,7 @@ const Header = () => {
src={Arrow}
alt="Arrow"
className="cursor-pointer hover:scale-105 transition-transform duration-300 ease-in-out [filter:_drop-shadow(0_0_4px_rgb(0_0_0_/_0.4))]"
onClick={() => window.scrollBy(0, window.innerHeight)}
onClick={() => router.replace('/#who-we-are')}
/>
</div>
</div>
Expand Down

0 comments on commit d6f1146

Please sign in to comment.