mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-05 06:28:51 +00:00
I make phone work (#89)
This commit is contained in:
1 parent
7420a20c7e
commit
7bafa7d518
4 files changed
+5
-11
No files matched your search
@@ -2,7 +2,6 @@ import React from 'react';
|
|||||||
import { ContactList } from '../List/ContactList';
|
import { ContactList } from '../List/ContactList';
|
||||||
import Fab from '@material-ui/core/Fab';
|
import Fab from '@material-ui/core/Fab';
|
||||||
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
import PersonAddIcon from '@material-ui/icons/PersonAdd';
|
||||||
import { ContactAlert } from '../alert/ContactAlert';
|
|
||||||
import { useHistory } from 'react-router-dom';
|
import { useHistory } from 'react-router-dom';
|
||||||
import { makeStyles, Theme } from '@material-ui/core/styles';
|
import { makeStyles, Theme } from '@material-ui/core/styles';
|
||||||
|
|
||||||
@@ -33,7 +32,6 @@ export const ContactPage = () => {
|
|||||||
>
|
>
|
||||||
<PersonAddIcon />
|
<PersonAddIcon />
|
||||||
</Fab>
|
</Fab>
|
||||||
<ContactAlert />
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
import { AppWrapper } from '../../../ui/components';
|
import { AppWrapper } from '../../../ui/components';
|
||||||
import { AppTitle } from '../../../ui/components/AppTitle';
|
|
||||||
import { AppContent } from '../../../ui/components/AppContent';
|
import { AppContent } from '../../../ui/components/AppContent';
|
||||||
import { useApp } from '../../../os/apps/hooks/useApps';
|
import { useApp } from '../../../os/apps/hooks/useApps';
|
||||||
import { useExample } from '../hooks/useExample';
|
import { useExample } from '../hooks/useExample';
|
||||||
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
|
||||||
import SnackbarProvider from '../../../ui/components/SnackbarProvider';
|
|
||||||
|
|
||||||
export const ExampleApp = () => {
|
export const ExampleApp = () => {
|
||||||
// calling the example hook, and we assign the value to a variable
|
// calling the example hook, and we assign the value to a variable
|
||||||
@@ -17,6 +14,7 @@ export const ExampleApp = () => {
|
|||||||
<AppWrapper>
|
<AppWrapper>
|
||||||
<AppContent>
|
<AppContent>
|
||||||
<h1>This is an example</h1>
|
<h1>This is an example</h1>
|
||||||
|
<h2>{example.id}</h2>
|
||||||
{/* Here we are using the value in a h3 tag */}
|
{/* Here we are using the value in a h3 tag */}
|
||||||
<h3>{exampleString}</h3>
|
<h3>{exampleString}</h3>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import React, { useEffect } from 'react';
|
import React from 'react';
|
||||||
import { AppWrapper } from '../../ui/components/AppWrapper';
|
import { AppWrapper } from '../../ui/components/AppWrapper';
|
||||||
import { AppContent } from '../../ui/components/AppContent';
|
import { AppContent } from '../../ui/components/AppContent';
|
||||||
import { AppTitle } from '../../ui/components/AppTitle';
|
import { AppTitle } from '../../ui/components/AppTitle';
|
||||||
@@ -32,7 +32,7 @@ InjectDebugData([
|
|||||||
content: 'Hello, this is another shitty note',
|
content: 'Hello, this is another shitty note',
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
}
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
export const NotesApp = () => {
|
export const NotesApp = () => {
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
|
|
||||||
import { createContext, useCallback } from 'react';
|
|
||||||
import { useSetRecoilState } from 'recoil';
|
import { useSetRecoilState } from 'recoil';
|
||||||
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
||||||
import { useNotes } from './useNotes';
|
import { useNotes } from './useNotes';
|
||||||
@@ -7,10 +5,10 @@ import { noteStates } from './state';
|
|||||||
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
import { useSnackbar } from '../../../ui/hooks/useSnackbar';
|
||||||
|
|
||||||
export const useNotesService = () => {
|
export const useNotesService = () => {
|
||||||
const { addAlert } = useSnackbar()
|
const { addAlert } = useSnackbar();
|
||||||
const setNotes = useSetRecoilState(noteStates.noteItems);
|
const setNotes = useSetRecoilState(noteStates.noteItems);
|
||||||
|
|
||||||
useNuiEvent('NOTES', 'setNotes', setNotes);
|
useNuiEvent('NOTES', 'setNotes', setNotes);
|
||||||
useNuiEvent('NOTES', 'setAlert', addAlert)
|
useNuiEvent('NOTES', 'setAlert', addAlert);
|
||||||
return useNotes();
|
return useNotes();
|
||||||
};
|
};
|
||||||
Reference in new issue
Block a user