mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
working typescript version
This commit is contained in:
1 parent
581d6011e0
commit
cff746aa38
119 files changed
+247
-189
No files matched your search
@@ -0,0 +1,24 @@
|
||||
import React from "react";
|
||||
import { useSetRecoilState } from "recoil";
|
||||
import { Button } from "@material-ui/core";
|
||||
import ReplyIcon from "@material-ui/icons/Reply";
|
||||
|
||||
import { twitterState } from "../../hooks/state";
|
||||
|
||||
export const ReplyButton = ({ profile_name }) => {
|
||||
const setModalVisible = useSetRecoilState(twitterState.showCreateTweetModal);
|
||||
const setMessage = useSetRecoilState(twitterState.modalMessage);
|
||||
|
||||
const handleClick = () => {
|
||||
setMessage(`@${profile_name} `);
|
||||
setModalVisible(true);
|
||||
};
|
||||
|
||||
return (
|
||||
<Button onClick={handleClick}>
|
||||
<ReplyIcon />
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default ReplyButton;
|
||||
Reference in new issue
Block a user