mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-25 02:08:28 +02:00
Sort workspaces, envs, jars
This commit is contained in:
@@ -3,6 +3,10 @@ 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 function useCookieJars() {
|
||||
return useAtomValue(cookieJarsAtom);
|
||||
return useAtomValue(sortedCookieJars);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user