Spaces:
Runtime error
Runtime error
File size: 553 Bytes
3b6afc0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import { atom, useSetRecoilState } from 'recoil';
import { useCallback } from 'react';
const refreshConversationsHint = atom({
key: 'refreshConversationsHint',
default: 1,
});
const useConversations = () => {
const setRefreshConversationsHint = useSetRecoilState(refreshConversationsHint);
const refreshConversations = useCallback(() => {
setRefreshConversationsHint((prevState) => prevState + 1);
}, [setRefreshConversationsHint]);
return { refreshConversations };
};
export default { refreshConversationsHint, useConversations };
|