We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3284b85 commit ead1093Copy full SHA for ead1093
website/src/components/ui/common/SearchWindow.tsx
@@ -34,15 +34,17 @@ export const SearchWindow: FC = () => {
34
)}
35
<div id="search" />
36
</div>
37
- <script
38
- // biome-ignore lint/security/noDangerouslySetInnerHtml: pagefindで生成されたスクリプトを実行する
39
- dangerouslySetInnerHTML={{
40
- __html: `window.addEventListener('DOMContentLoaded', (event) => {
+ {!import.meta.env.DEV && (
+ <script
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: pagefindで生成されたスクリプトを実行する
+ dangerouslySetInnerHTML={{
41
+ __html: `window.addEventListener('DOMContentLoaded', (event) => {
42
new PagefindUI({ element: "#search", showSubResults: true });
43
});
44
`,
- }}
45
- />
+ }}
46
+ />
47
+ )}
48
49
);
50
};
0 commit comments