diff --git a/src/components/containers/CommentWrapper/styles.scss b/src/components/containers/CommentWrapper/styles.scss index b06fd81c..0a83f186 100644 --- a/src/components/containers/CommentWrapper/styles.scss +++ b/src/components/containers/CommentWrapper/styles.scss @@ -15,12 +15,13 @@ .thumb { flex: 0 0 $comment_height; - background: transparentize(black, 0.9); border-radius: $panel_radius 0 0 $panel_radius; + background-color: transparentize(black, 0.9); } .thumb_image { height: $comment_height; - background: transparentize(white, 0.97); + background: transparentize(white, 0.97) no-repeat 50% 50%; border-radius: $panel_radius 0 0 $panel_radius; + background-size: cover; } diff --git a/src/components/editors/ImageGrid/index.tsx b/src/components/editors/ImageGrid/index.tsx index 80a7f890..8b7f5052 100644 --- a/src/components/editors/ImageGrid/index.tsx +++ b/src/components/editors/ImageGrid/index.tsx @@ -1,6 +1,4 @@ -import React, { - FC, useCallback, ChangeEventHandler, DragEventHandler, -} from 'react'; +import React, { FC, useCallback, ChangeEventHandler, DragEventHandler } from 'react'; import { SortableContainer, SortableElement } from 'react-sortable-hoc'; import * as styles from './styles.scss'; import { ImageUpload } from '~/components/upload/ImageUpload'; @@ -31,7 +29,7 @@ const SortableList = SortableContainer(
{items.map((file, index) => ( - + ))} @@ -44,9 +42,7 @@ const SortableList = SortableContainer( ) ); -const ImageGrid: FC = ({ - items, locked, onFileMove, onUpload, -}) => { +const ImageGrid: FC = ({ items, locked, onFileMove, onUpload }) => { const onMove = useCallback(({ oldIndex, newIndex }) => onFileMove(oldIndex, newIndex), [ onFileMove, ]); diff --git a/src/components/node/Comment/index.tsx b/src/components/node/Comment/index.tsx index e979c09e..8e98d9ed 100644 --- a/src/components/node/Comment/index.tsx +++ b/src/components/node/Comment/index.tsx @@ -43,7 +43,7 @@ const Comment: FC = ({ comment, is_empty, is_loading, className, photo,
{groupped.image.map(file => (
- {file.name} + {file.name}
))}
@@ -55,7 +55,7 @@ const Comment: FC = ({ comment, is_empty, is_loading, className, photo,
{ - Player.set(getURL(file.url)); + Player.set(getURL(file)); Player.load(); Player.play(); }} diff --git a/src/components/node/CommentForm/index.tsx b/src/components/node/CommentForm/index.tsx index 355f6a28..a5250131 100644 --- a/src/components/node/CommentForm/index.tsx +++ b/src/components/node/CommentForm/index.tsx @@ -17,9 +17,12 @@ import * as UPLOAD_ACTIONS from '~/redux/uploads/actions'; import { selectUploads } from '~/redux/uploads/selectors'; import { IState } from '~/redux/store'; import { getFileType } from '~/utils/uploader'; +import { selectUser } from '~/redux/auth/selectors'; +import { getURL } from '~/utils/dom'; const mapStateToProps = (state: IState) => ({ node: selectNode(state), + user: selectUser(state), uploads: selectUploads(state), }); @@ -37,6 +40,7 @@ type IProps = ReturnType & const CommentFormUnconnected: FC = ({ node: { comment_data, is_sending_comment }, uploads: { statuses, files }, + user: { photo }, id, nodePostComment, nodeSetCommentData, @@ -116,7 +120,7 @@ const CommentFormUnconnected: FC = ({ const comment = comment_data[id]; return ( - +