Download spectrum/src/components/listItems/channel/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 744 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/listItems/channel/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/src/components/listItems/channel/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/listItems/channel/index.js
744 Bytes
| // @flow | |
| import * as React from 'react'; | |
| import { | |
| ChannelContainer, | |
| ChannelNameLink, | |
| ChannelName, | |
| ChannelActions, | |
| } from './style'; | |
| import type { ChannelInfoType } from 'shared/graphql/fragments/channel/channelInfo'; | |
| type Props = { | |
| children: React$Node, | |
| channel: ChannelInfoType, | |
| }; | |
| class ChannelListItem extends React.Component<Props> { | |
| render() { | |
| const { channel, children } = this.props; | |
| return ( | |
| <ChannelContainer> | |
| <ChannelNameLink to={`/${channel.community.slug}/${channel.slug}`}> | |
| <ChannelName>{channel.name}</ChannelName> | |
| </ChannelNameLink> | |
| {children && <ChannelActions>{children}</ChannelActions>} | |
| </ChannelContainer> | |
| ); | |
| } | |
| } | |
| export default ChannelListItem; | |