File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 1
- import { atom , selector } from 'recoil' ;
1
+ import { atom } from 'recoil' ;
2
2
3
3
import { Block , BlockMap , Page } from '@/schemes' ;
4
- import { fetchDummyData , readBlockMap , refreshPages } from '@/utils' ;
4
+ import { readBlockMap , refreshPages } from '@/utils' ;
5
5
import { MutableRefObject } from 'react' ;
6
6
7
7
enum StateType {
@@ -24,20 +24,13 @@ export const pagesState = atom({
24
24
default : refreshPages ( ) ,
25
25
} ) ;
26
26
27
- export const selectedPageState = atom ( {
28
- key : StateType . SELECTED_PAGE_STATE ,
29
- default : ( async ( ) => ( await refreshPages ( ) ) [ 0 ] ) ( ) ,
30
- } ) ;
31
-
32
27
export const pageState = atom < Page > ( {
33
28
key : StateType . PAGE_STATE ,
34
- // default: (async () => (await fetchDummyData()).page)(),
35
29
default : ( async ( ) => ( await refreshPages ( ) ) [ 0 ] ) ( ) ,
36
30
} ) ;
37
31
38
32
export const blockMapState = atom < BlockMap > ( {
39
33
key : StateType . BLOCK_MAP_STATE ,
40
- // default: (async () => (await fetchDummyData()).blockMap)(),
41
34
default : ( async ( ) => {
42
35
const page = ( await refreshPages ( ) ) [ 0 ] ;
43
36
const { blockMap } = await readBlockMap ( page . id ) ;
You can’t perform that action at this time.
0 commit comments