I make phone work (#89)

This commit is contained in:
J Francisco Rader authored and GitHub committed 2021-02-14 13:40:57 -05:00
1 parent 7420a20c7e
commit 7bafa7d518
4 files changed
+14 -20

No files matched your search

+11 -11
View File
@@ -1,4 +1,4 @@
import React, { useEffect } from 'react';
import React from 'react';
import { AppWrapper } from '../../ui/components/AppWrapper';
import { AppContent } from '../../ui/components/AppContent';
import { AppTitle } from '../../ui/components/AppTitle';
@@ -32,7 +32,7 @@ InjectDebugData([
content: 'Hello, this is another shitty note',
},
],
}
},
]);
export const NotesApp = () => {
@@ -56,15 +56,15 @@ export const NotesApp = () => {
<NoteList notes={notes} />
</AppContent>
<Fab
className={classes.absolute}
onClick={handleModal}
style={{
background: '#f9a825',
color: '#fff',
}}
>
<AddIcon />
</Fab>
className={classes.absolute}
onClick={handleModal}
style={{
background: '#f9a825',
color: '#fff',
}}
>
<AddIcon />
</Fab>
</AppWrapper>
);
};
@@ -1,5 +1,3 @@
import { createContext, useCallback } from 'react';
import { useSetRecoilState } from 'recoil';
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { useNotes } from './useNotes';
@@ -7,10 +5,10 @@ import { noteStates } from './state';
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
export const useNotesService = () => {
const { addAlert } = useSnackbar()
const { addAlert } = useSnackbar();
const setNotes = useSetRecoilState(noteStates.noteItems);
useNuiEvent('NOTES', 'setNotes', setNotes);
useNuiEvent('NOTES', 'setAlert', addAlert)
useNuiEvent('NOTES', 'setAlert', addAlert);
return useNotes();
};