forked from phoenix/litellm-mirror
fix import and add fallback
This commit is contained in:
parent
c54f23f936
commit
8a45abb563
1 changed files with 36 additions and 36 deletions
|
@ -24,7 +24,7 @@ export default function SearchBarWrapper(props) {
|
||||||
import("@getcanary/web/components/canary-content"),
|
import("@getcanary/web/components/canary-content"),
|
||||||
import("@getcanary/web/components/canary-search"),
|
import("@getcanary/web/components/canary-search"),
|
||||||
import("@getcanary/web/components/canary-search-input"),
|
import("@getcanary/web/components/canary-search-input"),
|
||||||
import("@getcanary/web/components/canary-search-results"),
|
import("@getcanary/web/components/canary-search-results-group"),
|
||||||
import("@getcanary/web/components/canary-footer"),
|
import("@getcanary/web/components/canary-footer"),
|
||||||
import("@getcanary/web/components/canary-callout-calendly"),
|
import("@getcanary/web/components/canary-callout-calendly"),
|
||||||
import("@getcanary/web/components/canary-callout-discord"),
|
import("@getcanary/web/components/canary-callout-discord"),
|
||||||
|
@ -33,10 +33,6 @@ export default function SearchBarWrapper(props) {
|
||||||
.catch(console.error);
|
.catch(console.error);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (!loaded || !path) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
|
@ -46,6 +42,9 @@ export default function SearchBarWrapper(props) {
|
||||||
gap: "6px",
|
gap: "6px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{!loaded || !path ? (
|
||||||
|
<span style={{ fontSize: "2rem" }}>🐤</span>
|
||||||
|
) : (
|
||||||
<canary-root framework="docusaurus">
|
<canary-root framework="docusaurus">
|
||||||
<canary-provider-pagefind
|
<canary-provider-pagefind
|
||||||
options={JSON.stringify({ ...options, path })}
|
options={JSON.stringify({ ...options, path })}
|
||||||
|
@ -77,6 +76,7 @@ export default function SearchBarWrapper(props) {
|
||||||
</canary-modal>
|
</canary-modal>
|
||||||
</canary-provider-pagefind>
|
</canary-provider-pagefind>
|
||||||
</canary-root>
|
</canary-root>
|
||||||
|
)}
|
||||||
|
|
||||||
<SearchBar {...props} />
|
<SearchBar {...props} />
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue