mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +00:00
Merge branch 'master' of github.com:Re-Ignited-Development/new-phone-who-dis into feature/twitter_likes
This commit is contained in:
commit
54d0637e15
145 files changed
+4944
-489
No files matched your search
@@ -0,0 +1,8 @@
|
||||
import { atom } from "recoil";
|
||||
|
||||
export const selloutState = {
|
||||
listing: atom({
|
||||
key: "listing",
|
||||
default: null,
|
||||
}),
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
import { useRecoilValue } from "recoil";
|
||||
import { selloutState } from "./state";
|
||||
|
||||
export const useListing = () => {
|
||||
const listing = useRecoilValue(selloutState.listing);
|
||||
return { listing };
|
||||
};
|
||||
@@ -0,0 +1,10 @@
|
||||
import { useNuiEvent } from "../../../os/nui-events/hooks/useNuiEvent";
|
||||
import { selloutState } from "./state";
|
||||
import { useListing } from "./useListing";
|
||||
import { useSetRecoilState } from "recoil";
|
||||
|
||||
export const useSelloutService = () => {
|
||||
const setSellout = useSetRecoilState(selloutState.listing);
|
||||
useNuiEvent("SELLOUT", "setListings", setSellout);
|
||||
return useListing();
|
||||
};
|
||||
Reference in new issue
Block a user