Download spectrum/src/components/message/threadAttachment/index.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 771 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/message/threadAttachment/index.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/src/components/message/threadAttachment/index.js
-
curl -L -o index.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/src/components/message/threadAttachment/index.js
771 Bytes
| // @flow | |
| import React from 'react'; | |
| import compose from 'recompose/compose'; | |
| import { | |
| getThreadById, | |
| type GetThreadType, | |
| } from 'shared/graphql/queries/thread/getThread'; | |
| import type { MessageInfoType } from 'shared/graphql/fragments/message/messageInfo.js'; | |
| import type { UserInfoType } from 'shared/graphql/fragments/user/userInfo.js'; | |
| import Attachment from './attachment'; | |
| export type Props = { | |
| currentUser: UserInfoType, | |
| message: MessageInfoType, | |
| id: string, | |
| data: { | |
| thread: GetThreadType, | |
| loading: boolean, | |
| error: ?string, | |
| }, | |
| }; | |
| const Query = ({ data, message, id, ...rest }: Props) => ( | |
| <Attachment message={message} id={id} data={data} /> | |
| ); | |
| const ThreadAttachment = compose(getThreadById)(Query); | |
| export default ThreadAttachment; | |