mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-17 22:39:42 +02:00
Explicitly set the request layout (#257)
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import deepEqual from '@gilbarbara/deep-equal';
|
||||
import type { Atom } from 'jotai';
|
||||
import { selectAtom } from 'jotai/utils';
|
||||
import type { SplitLayoutLayout } from '../components/core/SplitLayout';
|
||||
import { atomWithKVStorage } from './atoms/atomWithKVStorage';
|
||||
|
||||
export function deepEqualAtom<T>(a: Atom<T>) {
|
||||
return selectAtom(
|
||||
@@ -9,3 +11,8 @@ export function deepEqualAtom<T>(a: Atom<T>) {
|
||||
(a, b) => deepEqual(a, b),
|
||||
);
|
||||
}
|
||||
|
||||
export const workspaceLayoutAtom = atomWithKVStorage<SplitLayoutLayout>(
|
||||
'workspace_layout',
|
||||
'horizontal',
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user