mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added user profile popup
This commit is contained in:
parent
43450dff54
commit
1242c04587
10 changed files with 162 additions and 57 deletions
|
@ -1,7 +1,7 @@
|
|||
import React, { FC, useCallback } from 'react';
|
||||
import { INode } from '~/redux/types';
|
||||
import styles from './styles.module.scss';
|
||||
import { CommentAvatar } from '~/components/comment/CommentAvatar';
|
||||
import { Avatar } from '~/components/common/Avatar';
|
||||
import { openUserProfile } from '~/utils/user';
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
|
||||
|
@ -24,7 +24,7 @@ const NodeAuthorBlock: FC<Props> = ({ node }) => {
|
|||
|
||||
return (
|
||||
<div className={styles.block} onClick={onOpenProfile}>
|
||||
<CommentAvatar username={username} url={photo?.url} className={styles.avatar} />
|
||||
<Avatar username={username} url={photo?.url} className={styles.avatar} />
|
||||
|
||||
<div className={styles.info}>
|
||||
<div className={styles.username}>{fullname || username}</div>
|
||||
|
|
|
@ -16,7 +16,7 @@ type IProps = ReturnType<typeof mapStateToProps> & {
|
|||
|
||||
const NodeCommentFormUnconnected: FC<IProps> = ({ user, isBefore, nodeId }) => {
|
||||
return (
|
||||
<CommentWrapper user={user}>
|
||||
<CommentWrapper user={user} isForm>
|
||||
<CommentForm nodeId={nodeId} />
|
||||
</CommentWrapper>
|
||||
);
|
||||
|
|
|
@ -5,7 +5,7 @@ import { INode } from '~/redux/types';
|
|||
import { PRESETS, URLS } from '~/constants/urls';
|
||||
import { RouteComponentProps, withRouter } from 'react-router';
|
||||
import { getURL, stringToColour } from '~/utils/dom';
|
||||
import { CommentAvatar } from '~/components/comment/CommentAvatar';
|
||||
import { Avatar } from '~/components/common/Avatar';
|
||||
|
||||
type IProps = RouteComponentProps & {
|
||||
item: Partial<INode>;
|
||||
|
@ -69,7 +69,7 @@ const NodeRelatedItemUnconnected: FC<IProps> = memo(({ item, history }) => {
|
|||
onClick={onClick}
|
||||
ref={ref}
|
||||
>
|
||||
<CommentAvatar
|
||||
<Avatar
|
||||
username={item.title}
|
||||
url={item.thumbnail}
|
||||
className={classNames(styles.thumb, { [styles.is_loaded]: is_loaded })}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue