Make use of library instead of having code duplicated (#201)

* Use fivem-nui-react-lib
This commit is contained in:
J Francisco Rader authored and GitHub committed 2021-04-07 19:07:10 -03:00
1 parent 0cf5bc2bc7
commit 8e79eb1345
60 files changed
+231 -347

No files matched your search

+3 -3
View File
@@ -7,8 +7,7 @@ import { AppContent } from '../../../ui/components/AppContent';
import { useApp } from '../../../os/apps/hooks/useApps';
import InjectDebugData from '../../../os/debug/InjectDebugData';
import { MatchThemeProvider } from '../providers/MatchThemeProvider';
import Nui from '../../../os/nui-events/utils/Nui';
import { useNuiRequest } from 'fivem-nui-react-lib';
import MatchBottomNavigation from '../components/BottomNavigation';
import MatchPage from './views/MatchPage';
import ProfileEditor from './views/ProfileEditor';
@@ -17,13 +16,14 @@ import { MatchEvents } from '../../../../../typings/match';
import { useProfile } from '../hooks/useProfile';
export const MatchApp = () => {
const Nui = useNuiRequest();
const match = useApp('MATCH');
const [activePage, setActivePage] = useState(0);
const { noProfileExists } = useProfile();
useEffect(() => {
Nui.send(MatchEvents.INITIALIZE);
}, []);
}, [Nui]);
const handlePageChange = (e, page) => setActivePage(page);