2024-05-14 11:00:01 -04:00
|
|
|
import { atom } from 'recoil';
|
2023-03-28 20:36:21 +08:00
|
|
|
|
2023-08-18 12:02:39 -04:00
|
|
|
const isSearchEnabled = atom<boolean | null>({
|
2023-03-28 20:36:21 +08:00
|
|
|
key: 'isSearchEnabled',
|
2023-07-14 09:36:49 -04:00
|
|
|
default: null,
|
2023-03-28 20:36:21 +08:00
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const searchQuery = atom({
|
|
|
|
|
key: 'searchQuery',
|
2023-07-14 09:36:49 -04:00
|
|
|
default: '',
|
2023-03-28 20:36:21 +08:00
|
|
|
});
|
|
|
|
|
|
2024-09-22 04:45:50 +02:00
|
|
|
const isSearching = atom({
|
|
|
|
|
key: 'isSearching',
|
|
|
|
|
default: false,
|
|
|
|
|
});
|
|
|
|
|
|
2025-04-15 10:04:00 +02:00
|
|
|
const isSearchTyping = atom({
|
|
|
|
|
key: 'isSearchTyping',
|
|
|
|
|
default: false,
|
|
|
|
|
});
|
|
|
|
|
|
2023-03-28 20:36:21 +08:00
|
|
|
export default {
|
|
|
|
|
isSearchEnabled,
|
2023-07-14 09:36:49 -04:00
|
|
|
searchQuery,
|
2024-09-22 04:45:50 +02:00
|
|
|
isSearching,
|
2025-04-15 10:04:00 +02:00
|
|
|
isSearchTyping,
|
2023-03-28 20:36:21 +08:00
|
|
|
};
|