Download wp-calypso/client/state/admin-menu/selectors/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 424 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/selectors/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/admin-menu/selectors/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/admin-menu/selectors/index.js
424 Bytes
| import 'calypso/state/admin-menu/init'; | |
| export function getAdminMenu( state, siteId ) { | |
| const stateSlice = state?.adminMenu?.menus; | |
| if ( ! stateSlice || ! siteId ) { | |
| return null; | |
| } | |
| return state.adminMenu.menus[ siteId ] || null; | |
| } | |
| export function getIsRequestingAdminMenu( state ) { | |
| const stateSlice = state?.adminMenu?.requesting; | |
| if ( ! stateSlice ) { | |
| return null; | |
| } | |
| return state.adminMenu.requesting; | |
| } | |