Download spectrum/src/components/inboxThread/messageCount.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 704 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/src/components/inboxThread/messageCount.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset@1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/src/components/inboxThread/messageCount.js
-
curl -L -o messageCount.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/1e92f2d0b9e054abc23a53595fd89ad3e2b4a34e/spectrum/src/components/inboxThread/messageCount.js
704 Bytes
| // @flow | |
| import * as React from 'react'; | |
| import type { GetThreadType } from 'shared/graphql/queries/thread/getThread'; | |
| import Icon from 'src/components/icon'; | |
| import { CountWrapper } from './style'; | |
| type Props = { | |
| currentUser: ?Object, | |
| thread: GetThreadType, | |
| active: boolean, | |
| }; | |
| class MessageCount extends React.Component<Props> { | |
| render() { | |
| const { | |
| thread: { messageCount }, | |
| active, | |
| } = this.props; | |
| return ( | |
| <CountWrapper active={active}> | |
| <Icon | |
| style={{ pointerEvents: 'none' }} | |
| glyph="message-simple" | |
| size={24} | |
| /> | |
| <span>{messageCount}</span> | |
| </CountWrapper> | |
| ); | |
| } | |
| } | |
| export default MessageCount; | |