Devendra174's picture
Upload folder using huggingface_hub
1e92f2d verified
raw
history blame
826 Bytes
// @flow
import * as React from 'react';
import compose from 'recompose/compose';
import viewNetworkHandler, {
type ViewNetworkHandlerType,
} from '../viewNetworkHandler';
import getUserGithubProfile, {
type GetUserGithbProfileType,
} from 'shared/graphql/queries/user/getUserGithubProfile';
type Props = {
id: string,
...$Exact<ViewNetworkHandlerType>,
data: {
user?: GetUserGithbProfileType,
},
render: Function,
};
class GithubProfile extends React.Component<Props> {
render() {
const {
data: { user },
render,
} = this.props;
if (user) {
if (!user.githubProfile || !user.githubProfile.id) return render(null);
return render(user.githubProfile);
}
return null;
}
}
export default compose(
getUserGithubProfile,
viewNetworkHandler
)(GithubProfile);