()
| 25 | export { isConnectAlreadyExists }; |
| 26 | |
| 27 | export function useOptionalCurrentUser() { |
| 28 | const user = useAppStore((state) => state.currentUser); |
| 29 | const loadCurrentUser = useAppStore((state) => state.loadCurrentUser); |
| 30 | useEffect(() => { |
| 31 | void loadCurrentUser(); |
| 32 | }, [loadCurrentUser]); |
| 33 | return user; |
| 34 | } |
| 35 | |
| 36 | export function useCurrentUser() { |
| 37 | const user = useOptionalCurrentUser(); |
no test coverage detected