diff --git a/src/app/page.tsx b/src/app/page.tsx index f9d74e624..f9ad78a84 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -16,7 +16,7 @@ import { TextField, } from '@radix-ui/themes'; import { go } from 'fuzzysort'; -import { debounce } from 'lodash'; +import { debounce, times } from 'lodash'; import { useRef, useState } from 'react'; import { Link } from '../components/Link'; import { NAVBAR_HEIGHT } from '../components/Navbar'; @@ -148,8 +148,15 @@ export default function Page() { if (!search.current) return; const sanitized = search.current.value.trim(); - setShowSearch(sanitized.length > 0); + + window.scrollTo({ + top: + search.current.getBoundingClientRect().top - + NAVBAR_HEIGHT - + 32, + behavior: 'smooth', + }); }} > @@ -345,6 +352,10 @@ export default function Page() { + {times(64, () => ( +
+ ))} +
);