Skip to content

Commit 51b3960

Browse files
committed
[#115] refactor: store 내 필요 없는 코드 제거
1 parent 153d3a0 commit 51b3960

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

frontend/src/stores/page.ts

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
import { atom, selector } from 'recoil';
1+
import { atom } from 'recoil';
22

33
import { Block, BlockMap, Page } from '@/schemes';
4-
import { fetchDummyData, readBlockMap, refreshPages } from '@/utils';
4+
import { readBlockMap, refreshPages } from '@/utils';
55
import { MutableRefObject } from 'react';
66

77
enum StateType {
@@ -24,20 +24,13 @@ export const pagesState = atom({
2424
default: refreshPages(),
2525
});
2626

27-
export const selectedPageState = atom({
28-
key: StateType.SELECTED_PAGE_STATE,
29-
default: (async () => (await refreshPages())[0])(),
30-
});
31-
3227
export const pageState = atom<Page>({
3328
key: StateType.PAGE_STATE,
34-
// default: (async () => (await fetchDummyData()).page)(),
3529
default: (async () => (await refreshPages())[0])(),
3630
});
3731

3832
export const blockMapState = atom<BlockMap>({
3933
key: StateType.BLOCK_MAP_STATE,
40-
// default: (async () => (await fetchDummyData()).blockMap)(),
4134
default: (async () => {
4235
const page = (await refreshPages())[0];
4336
const { blockMap } = await readBlockMap(page.id);

0 commit comments

Comments
 (0)