Fix environment activation and setting active cookie jar

This commit is contained in:
Gregory Schier
2025-01-13 07:15:01 -08:00
parent 88ff7f4300
commit ad4d695b75
11 changed files with 30 additions and 35 deletions

View File

@@ -3,9 +3,9 @@ import { atom, useAtomValue } from 'jotai';
export const cookieJarsAtom = atom<CookieJar[] | undefined>();
export const sortedCookieJars = atom((get) =>
get(cookieJarsAtom)?.sort((a, b) => a.name.localeCompare(b.name)),
);
export const sortedCookieJars = atom((get) => {
return get(cookieJarsAtom)?.sort((a, b) => a.name.localeCompare(b.name));
});
export function useCookieJars() {
return useAtomValue(sortedCookieJars);