Skip to content

Commit 66e96a2

Browse files
committed
make search clientOnly
1 parent c2af834 commit 66e96a2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/ui/layout/main-header.tsx

+6-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,12 @@ import { useMatch } from "@solidjs/router";
99
import { SUPPORTED_LOCALES } from "~/i18n/config";
1010
import { LanguageSelector } from "./language-selector";
1111

12-
import { Search } from "../search";
1312
import { useCurrentRouteMetaData } from "~/utils/route-metadata-helper";
13+
import { clientOnly } from "node_modules/@solidjs/start/dist";
14+
15+
const ClientSearch = clientOnly(() =>
16+
import("../search").then((m) => ({ default: m.Search }))
17+
);
1418

1519
interface Entry {
1620
title: string;
@@ -122,7 +126,7 @@ export function MainHeader(props: NavProps) {
122126
</ul>
123127

124128
<div class="lg:order-2 flex basis-0 gap-4 items-center justify-end order-">
125-
<Search />
129+
<ClientSearch />
126130
<A
127131
href={`https://github.com/solidjs${currentRouteMetaData().project ? currentRouteMetaData().project : "/solid"}`}
128132
class="group"

0 commit comments

Comments
 (0)