Files
spacedrive/interface/hooks/useExplorerConfigStore.ts
Jamie Pine e8895c1a05 [ENG-581, ENG-597, ENG-600] Overview categories (#779)
* added base UI for categories on overview

* update core

* cleanup ui

* Inspector default view if nothing is selected, explorer takes child components, hidden menu tweak if no items are sm:flex

* wip

* somewhat functional

* scroll

* category fixes

* clean category bar

* added config store + made toolbar available on all explorer screens

* clean up overview.tsx

* added counts

* fix inspector bug

* add support for favorites
+ add book extension support

* refactor into smaller components

* Some small rust nitpicks

* fix camel case location_type

* Rust fmt

* fix typescript CI

---------

Co-authored-by: ameer2468 <33054370+ameer2468@users.noreply.github.com>
Co-authored-by: nikec <nikec.job@gmail.com>
Co-authored-by: Ericson Soares <ericson.ds999@gmail.com>
2023-05-17 20:34:05 +00:00

15 lines
345 B
TypeScript

import { useSnapshot } from 'valtio';
import { valtioPersist } from '@sd/client';
export const explorerConfigStore = valtioPersist('explorer-config', {
openOnDoubleClick: true
});
export function useExplorerConfigStore() {
return useSnapshot(explorerConfigStore);
}
export function getExplorerConfigStore() {
return explorerConfigStore;
}