Download spectrum/src/components/inboxThread/header/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 825 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/inboxThread/header/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/src/components/inboxThread/header/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/inboxThread/header/index.js
825 Bytes
| // @flow | |
| import * as React from 'react'; | |
| import type { GetThreadType } from 'shared/graphql/queries/thread/getThread'; | |
| import ThreadHeader from './threadHeader'; | |
| import UserProfileThreadHeader from './userProfileThreadHeader'; | |
| export type HeaderProps = { | |
| thread: GetThreadType, | |
| active: boolean, | |
| currentUser: ?Object, | |
| viewContext?: | |
| | ?'inbox' | |
| | 'communityInbox' | |
| | 'communityProfile' | |
| | 'channelInbox' | |
| | 'channelProfile' | |
| | 'userProfile' | |
| | 'userProfileReplies', | |
| }; | |
| class Header extends React.Component<HeaderProps> { | |
| render() { | |
| if ( | |
| this.props.viewContext === 'userProfile' || | |
| this.props.viewContext === 'userProfileReplies' | |
| ) { | |
| return <UserProfileThreadHeader {...this.props} />; | |
| } | |
| return <ThreadHeader {...this.props} />; | |
| } | |
| } | |
| export default Header; | |