Skip to content

Commit

Permalink
Fix search clicks and mastheads
Browse files Browse the repository at this point in the history
  • Loading branch information
mxcl committed Jan 11, 2024
1 parent f8be794 commit 11b8bad
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ export default function Search() {
/>
{/*
NOTE always open so fade away works
FIXME instead set to isopen otherwise some of the UI is occluded and unclickable after fade away
FIXME this occludes content :/
*/}
<Popper open={isopen} anchorEl={inputRef.current} placement='bottom-end'>
<Popper open={true} anchorEl={inputRef.current} placement='bottom-end'>
<Grow timeout={200} in={isopen}>
<Paper>
{has_text && <SearchResults />}
Expand Down
6 changes: 4 additions & 2 deletions src/pkgx.dev.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ function MyMasthead() {
<Stars href={`https://github.com/pkgxdev/`} hideCountIfMobile={true} />
</>

console.log(/\/pkgs\/.+/.test(pathname), pathname)

return <Masthead>
{/\/pkgs\/.+/.test(pathname) || stuff}
{(pathname.startsWith('/pkgs') || !isxs) && search}
{pathname.startsWith('/pkgs') && isxs ? null : stuff}
{pathname.startsWith('/pkgs') || !isxs ? search : undefined}
</Masthead>
}

0 comments on commit 11b8bad

Please sign in to comment.