mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Make use of library instead of having code duplicated (#201)
* Use fivem-nui-react-lib
This commit is contained in:
1 parent
0cf5bc2bc7
commit
8e79eb1345
60 files changed
+231
-347
No files matched your search
@@ -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);
|
||||
|
||||
|
||||
Reference in new issue
Block a user