diff --git a/phone/src/apps/camera/hooks/state.ts b/phone/src/apps/camera/hooks/state.ts index aa6495e..b5f9177 100644 --- a/phone/src/apps/camera/hooks/state.ts +++ b/phone/src/apps/camera/hooks/state.ts @@ -1,8 +1,9 @@ import { atom } from 'recoil'; +import { IPhoto } from '../../../../../typings/photo'; export const photoState = { - photos: atom({ + photos: atom({ key: 'galleryPhotos', - default: null, + default: [], }), }; diff --git a/phone/src/apps/camera/hooks/usePhotos.ts b/phone/src/apps/camera/hooks/usePhotos.ts index 1bee938..073a653 100644 --- a/phone/src/apps/camera/hooks/usePhotos.ts +++ b/phone/src/apps/camera/hooks/usePhotos.ts @@ -1,11 +1,6 @@ import { useRecoilValue } from 'recoil'; import { photoState } from './state'; -export interface ICameraPhoto { - id: string; - image: string; -} - -export const usePhotos = (): ICameraPhoto[] | null => { - return useRecoilValue(photoState.photos); +export const usePhotos = () => { + return useRecoilValue(photoState.photos); };