Download spectrum/src/views/communityMembers/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 1.37 kB
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/views/communityMembers/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/src/views/communityMembers/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/views/communityMembers/index.js
1.37 kB
| // @flow | |
| import * as React from 'react'; | |
| import compose from 'recompose/compose'; | |
| import { connect } from 'react-redux'; | |
| import type { GetCommunityType } from 'shared/graphql/queries/community/getCommunity'; | |
| import CommunityMembers from './components/communityMembers'; | |
| import type { Dispatch } from 'redux'; | |
| import { withCurrentUser } from 'src/components/withCurrentUser'; | |
| import { SectionsContainer, Column } from 'src/components/settingsViews/style'; | |
| import { ErrorBoundary, SettingsFallback } from 'src/components/error'; | |
| import { ErrorView } from 'src/views/viewHelpers'; | |
| type Props = { | |
| currentUser: Object, | |
| community: GetCommunityType, | |
| dispatch: Dispatch<Object>, | |
| match: Object, | |
| history: Object, | |
| }; | |
| class CommunityMembersSettings extends React.Component<Props> { | |
| render() { | |
| const { community, history } = this.props; | |
| if (community && community.id) { | |
| return ( | |
| <SectionsContainer> | |
| <Column> | |
| <ErrorBoundary fallbackComponent={SettingsFallback}> | |
| <CommunityMembers | |
| history={history} | |
| id={community.id} | |
| community={community} | |
| /> | |
| </ErrorBoundary> | |
| </Column> | |
| </SectionsContainer> | |
| ); | |
| } | |
| return <ErrorView />; | |
| } | |
| } | |
| export default compose( | |
| withCurrentUser, | |
| connect() | |
| )(CommunityMembersSettings); | |