Switch to BiomeJS (#306)

This commit is contained in:
Gregory Schier
2025-11-23 08:38:13 -08:00
committed by GitHub
parent 2bac610efe
commit ec3e2e16a9
332 changed files with 3007 additions and 4097 deletions

View File

@@ -19,7 +19,7 @@ export function useSubscribeActiveCookieJarId() {
useEffect(() => {
if (search == null) return; // Happens during Vite hot reload
const activeCookieJar = cookieJars?.find((j) => j.id == cookieJarId) ?? null;
const activeCookieJar = cookieJars?.find((j) => j.id === cookieJarId) ?? null;
jotaiStore.set(activeCookieJarAtom, activeCookieJar);
}, [cookieJarId, cookieJars, search]);
}
@@ -33,6 +33,11 @@ export function useEnsureActiveCookieJar() {
const { cookie_jar_id: activeCookieJarId } = useSearch({ from: '/workspaces/$workspaceId/' });
// Set the active cookie jar to the first one, if none set
// NOTE: We only run this on cookieJars to prevent data races when switching workspaces since a lot of
// things change when switching workspaces, and we don't currently have a good way to ensure that all
// stores have updated.
// TODO: Create a global data store that can handle this case
// biome-ignore lint/correctness/useExhaustiveDependencies: none
useEffect(() => {
if (cookieJars == null) return; // Hasn't loaded yet
@@ -49,11 +54,5 @@ export function useEnsureActiveCookieJar() {
// There's no active jar, so set it to the first one
console.log('Defaulting active cookie jar to first jar', firstJar);
setWorkspaceSearchParams({ cookie_jar_id: firstJar.id });
// NOTE: We only run this on cookieJars to prevent data races when switching workspaces since a lot of
// things change when switching workspaces, and we don't currently have a good way to ensure that all
// stores have updated.
// TODO: Create a global data store that can handle this case
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [cookieJars]);
}