mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
added initial profile dialog
This commit is contained in:
parent
f6baedc4cd
commit
618c2e3275
28 changed files with 315 additions and 58 deletions
|
@ -5,6 +5,7 @@ import { getURL } from '~/utils/dom';
|
|||
import { Icon } from '~/components/input/Icon';
|
||||
import { IUser } from '~/redux/auth/types';
|
||||
import { PRESETS } from '~/constants/urls';
|
||||
import { Link } from 'react-router-dom';
|
||||
|
||||
interface IProps {
|
||||
user: Partial<IUser>;
|
||||
|
@ -14,7 +15,8 @@ interface IProps {
|
|||
const UserButton: FC<IProps> = ({ user: { username, photo }, onLogout }) => (
|
||||
<div className={styles.wrap}>
|
||||
<Group horizontal className={styles.user_button}>
|
||||
<div>{username}</div>
|
||||
<Link to={`/~${username}`}>{username}</Link>
|
||||
|
||||
<div
|
||||
className={styles.user_avatar}
|
||||
style={{ backgroundImage: `url('${getURL(photo, PRESETS.avatar)}')` }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue