-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: integrates Orama for search #104
base: main
Are you sure you want to change the base?
Conversation
use react
Hey @micheleriva, I'm not able to push changes because your branch is Just wanted to say that I notice we're getting hydration errors. Not a big deal, we have the same problem on remix.run and we use just // app/ui/utils.ts
import { useEffect, useState } from "react";
let hydrating = true;
export function useHydrated() {
let [hydrated, setHydrated] = useState(() => !hydrating);
useEffect(() => {
hydrating = false;
setHydrated(true);
}, []);
return hydrated;
} // app/routes/$lang.$ref.tsx
{hydrated ? (
<SearchButton {...SearchButtonParams} colorScheme={colorScheme} />
) : (
<div className="h-[42px]" />
)} I went ahead and deployed to staging with this change. It doesn't seem like the class names passed into Overall I really like what y'all have, it's just a little tough to sell without being able to adjust the styles and make it look nice. I wonder if it's easier to just create our own button and wire it up instead of importing flash.mov |
@brookslybrand I tried adding a I fixed the hydration errors following your suggestion. I also believe you can create a custom button, the SearchBox is a web component that listens to a very specific custom event or signals to open. You can trigger it by using React props like: <SearchBox {...SearchBoxParams} show={myBooleanOpenState} /> |
As discussed with @brookslybrand, we're offering free search with Orama on the React Router website :)
This PR still includes development URLs and API keys, which are commit-safe. We can move them to the
.env
file if you prefer, but I don't personally think it's necessary.We're still fixing a couple of small things, but you can test this locally already.