react-code-dataset / wp-calypso /client /state /data-layer /wpcom /sites /rewind /policies /from-api.ts
react-code-dataset / wp-calypso /client /state /data-layer /wpcom /sites /rewind /policies /from-api.ts
Download wp-calypso/client/state/data-layer/wpcom/sites/rewind/policies/from-api.ts from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 399 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/sites/rewind/policies/from-api.ts
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/state/data-layer/wpcom/sites/rewind/policies/from-api.ts
-
curl -L -o from-api.ts https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/state/data-layer/wpcom/sites/rewind/policies/from-api.ts
399 Bytes
| import type { RewindPolicies } from 'calypso/state/rewind/policies/types'; | |
| type ApiResponse = { | |
| policies: { | |
| activity_log_limit_days: number; | |
| storage_limit_bytes: number; | |
| } | null; | |
| }; | |
| const fromApi = ( { policies }: ApiResponse ): RewindPolicies => ( { | |
| activityLogLimitDays: policies?.activity_log_limit_days, | |
| storageLimitBytes: policies?.storage_limit_bytes, | |
| } ); | |
| export default fromApi; | |