Download wp-calypso/client/reader/sidebar/reader-sidebar-lists/list.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 768 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/sidebar/reader-sidebar-lists/list.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/reader/sidebar/reader-sidebar-lists/list.jsx
-
curl -L -o list.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/reader/sidebar/reader-sidebar-lists/list.jsx
768 Bytes
| import PropTypes from 'prop-types'; | |
| import { Component } from 'react'; | |
| import ListItem from './list-item'; | |
| import ListItemCreateLink from './list-item-create-link'; | |
| export default class ReaderSidebarListsList extends Component { | |
| static propTypes = { | |
| lists: PropTypes.array, | |
| path: PropTypes.string.isRequired, | |
| currentListOwner: PropTypes.string, | |
| currentListSlug: PropTypes.string, | |
| }; | |
| render() { | |
| const { lists, currentListOwner, currentListSlug, path } = this.props; | |
| return ( | |
| <> | |
| { lists.map( ( list ) => ( | |
| <ListItem | |
| key={ list.ID } | |
| list={ list } | |
| path={ path } | |
| currentListOwner={ currentListOwner } | |
| currentListSlug={ currentListSlug } | |
| /> | |
| ) ) } | |
| <ListItemCreateLink path={ path } /> | |
| </> | |
| ); | |
| } | |
| } | |