Download wp-calypso/packages/data-stores/src/reader/hooks/use-is-query-enabled.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 259 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/reader/hooks/use-is-query-enabled.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/data-stores/src/reader/hooks/use-is-query-enabled.ts
-
curl -L -o use-is-query-enabled.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/data-stores/src/reader/hooks/use-is-query-enabled.ts
259 Bytes
| import { getSubkey } from '../helpers'; | |
| import { useIsLoggedIn } from '.'; | |
| const useIsQueryEnabled = () => { | |
| const { isLoggedIn } = useIsLoggedIn(); | |
| if ( isLoggedIn || getSubkey() ) { | |
| return true; | |
| } | |
| return false; | |
| }; | |
| export default useIsQueryEnabled; | |