Files
5chan/src/hooks/useClickForm.js
T

15 lines
316 B
JavaScript
Raw Normal View History

2023-09-16 21:40:23 +02:00
import useGeneralStore from './stores/useGeneralStore';
2023-03-20 17:08:05 +01:00
const useClickForm = () => {
2023-09-16 21:40:23 +02:00
const { setShowPostForm, setShowPostFormLink } = useGeneralStore.getState();
2023-03-20 17:08:05 +01:00
2023-09-16 21:40:23 +02:00
const handleClickForm = () => {
setShowPostForm(true);
setShowPostFormLink(false);
};
2023-03-20 17:08:05 +01:00
2023-09-16 21:40:23 +02:00
return handleClickForm;
2023-03-20 17:08:05 +01:00
};
2023-09-16 21:40:23 +02:00
export default useClickForm;