mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
working text field interactions and quote/replying
This commit is contained in:
1 parent
c9f27266bb
commit
d54eb50739
12 files changed
+154
-66
No files matched your search
@@ -9,6 +9,14 @@ export const twitterState = {
|
||||
key: "tweets",
|
||||
default: [],
|
||||
}),
|
||||
showCreateTweetModal: atom({
|
||||
key: "showCreateTweetModal",
|
||||
default: false,
|
||||
}),
|
||||
modalMessage: atom({
|
||||
key: "modalMessage",
|
||||
default: "",
|
||||
}),
|
||||
createTweetLoading: atom({
|
||||
key: "createTweetLoading",
|
||||
default: false,
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
import { useRecoilState } from "recoil";
|
||||
import { twitterState } from "./state";
|
||||
|
||||
export const useModal = () => {
|
||||
const [modalVisible, setModalVisible] = useRecoilState(
|
||||
twitterState.showCreateTweetModal
|
||||
);
|
||||
const [message, setMessage] = useRecoilState(twitterState.modalMessage);
|
||||
return { modalVisible, setModalVisible, message, setMessage };
|
||||
};
|
||||
Reference in new issue
Block a user