Skip to content

Commit

Permalink
Fix searchbar disappearing on language change
Browse files Browse the repository at this point in the history
  • Loading branch information
rangelfinal committed Sep 15, 2023
1 parent 9624d9f commit 4a067f8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 18 deletions.
4 changes: 3 additions & 1 deletion src/components/langDropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@ export const LangsDropdown = ({
<ul className="relative z-10 bg-light-black p-2 shadow">
{availableLangs.map((lang) => (
<li key={lang}>
<Link href={`/${lang}${href}`}>{lang}</Link>
<Link href={`/${lang}${href}`} prefetch={false}>
{lang}
</Link>
</li>
))}
</ul>
Expand Down
17 changes: 0 additions & 17 deletions src/components/search.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,8 @@
"use client";

import Script from "next/script";
/*import { usePathname, useSearchParams } from "next/navigation";
import { useEffect } from "react";*/

export const Search = () => {
/*const pathname = usePathname();
const searchParams = useSearchParams();*/

/*useEffect(() => {
// @ts-ignore
if (PagefindUI) {
console.log("oi");
// @ts-ignore
new PagefindUI({
element: "#search",
showSubResults: true,
});
}
}, [pathname, searchParams]);*/

return (
<>
<div id="search"></div>
Expand Down

0 comments on commit 4a067f8

Please sign in to comment.