mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-19 15:21:23 +02:00
Fix environment activation and setting active cookie jar
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user