mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 21:06:42 +07:00
displaying profile photo
This commit is contained in:
parent
a27ff0f52a
commit
6c1e88804b
7 changed files with 24 additions and 15 deletions
|
@ -43,7 +43,7 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_loading, className, photo,
|
|||
<div className={styles.images}>
|
||||
{groupped.image.map(file => (
|
||||
<div key={file.id}>
|
||||
<img src={getURL(file.url)} alt={file.name} />
|
||||
<img src={getURL(file)} alt={file.name} />
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
|
@ -55,7 +55,7 @@ const Comment: FC<IProps> = ({ comment, is_empty, is_loading, className, photo,
|
|||
<div
|
||||
key={file.id}
|
||||
onClick={() => {
|
||||
Player.set(getURL(file.url));
|
||||
Player.set(getURL(file));
|
||||
Player.load();
|
||||
Player.play();
|
||||
}}
|
||||
|
|
|
@ -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<typeof mapStateToProps> &
|
|||
const CommentFormUnconnected: FC<IProps> = ({
|
||||
node: { comment_data, is_sending_comment },
|
||||
uploads: { statuses, files },
|
||||
user: { photo },
|
||||
id,
|
||||
nodePostComment,
|
||||
nodeSetCommentData,
|
||||
|
@ -116,7 +120,7 @@ const CommentFormUnconnected: FC<IProps> = ({
|
|||
const comment = comment_data[id];
|
||||
|
||||
return (
|
||||
<CommentWrapper>
|
||||
<CommentWrapper photo={getURL(photo)}>
|
||||
<form onSubmit={onSubmit}>
|
||||
<div className={styles.input}>
|
||||
<Textarea
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue