mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-01 22:16:32 +00:00
13 lines
427 B
TypeScript
13 lines
427 B
TypeScript
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
|
|
import { useSetRecoilState } from 'recoil';
|
|
import { exampleState } from './state';
|
|
import { useExample } from './useExample';
|
|
|
|
export const useExampleService = () => {
|
|
const setExample = useSetRecoilState(exampleState.example);
|
|
useNuiEvent('EXAMPLE', 'setExample', setExample);
|
|
return useExample();
|
|
};
|
|
|
|
// call this function in the Phone.tsx file.
|