Download wp-calypso/client/state/ui/preview/actions.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 514 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/preview/actions.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/ui/preview/actions.js
-
curl -L -o actions.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/ui/preview/actions.js
514 Bytes
| import { PREVIEW_URL_CLEAR, PREVIEW_URL_SET } from 'calypso/state/action-types'; | |
| import { setLayoutFocus } from 'calypso/state/ui/layout-focus/actions'; | |
| import 'calypso/state/ui/init'; | |
| export function setPreviewUrl( url, siteId ) { | |
| return { | |
| type: PREVIEW_URL_SET, | |
| url, | |
| siteId, | |
| }; | |
| } | |
| export function clearPreviewUrl() { | |
| return { | |
| type: PREVIEW_URL_CLEAR, | |
| }; | |
| } | |
| export function closePreview() { | |
| return ( dispatch ) => { | |
| dispatch( clearPreviewUrl() ); | |
| dispatch( setLayoutFocus( 'content' ) ); | |
| }; | |
| } | |