mirror of
https://github.com/muerwre/orchidmap-front.git
synced 2025-04-25 19:16:41 +07:00
now user can login
This commit is contained in:
parent
e7960a6bf8
commit
e19001ca82
25 changed files with 493 additions and 32844 deletions
11
src/components/user/GuestButton.jsx
Normal file
11
src/components/user/GuestButton.jsx
Normal file
|
@ -0,0 +1,11 @@
|
|||
import React from 'react';
|
||||
|
||||
export const GuestButton = ({ onClick }) => (
|
||||
<div className="control-bar user-bar">
|
||||
<button
|
||||
onClick={onClick}
|
||||
>
|
||||
<span>ВОЙТИ</span>
|
||||
</button>
|
||||
</div>
|
||||
);
|
23
src/components/user/UserButton.jsx
Normal file
23
src/components/user/UserButton.jsx
Normal file
|
@ -0,0 +1,23 @@
|
|||
import React from 'react';
|
||||
import { UserPicture } from '$components/user/UserPicture';
|
||||
|
||||
export const UserButton = ({
|
||||
user: {
|
||||
id,
|
||||
userdata: {
|
||||
name,
|
||||
photo,
|
||||
}
|
||||
}
|
||||
}) => (
|
||||
<div className="control-bar user-bar">
|
||||
<div className="user-button">
|
||||
<UserPicture photo={photo} />
|
||||
|
||||
<div className="user-button-fields">
|
||||
<div className="user-button-name">{(name || id || '...')}</div>
|
||||
<div className="user-button-text">{(id || 'пользователь')}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
10
src/components/user/UserPicture.jsx
Normal file
10
src/components/user/UserPicture.jsx
Normal file
|
@ -0,0 +1,10 @@
|
|||
import React from 'react';
|
||||
|
||||
export const UserPicture = ({ photo }) => (
|
||||
<div
|
||||
className="user-button-picture"
|
||||
style={{
|
||||
backgroundImage: `url(${photo})`
|
||||
}}
|
||||
/>
|
||||
);
|
Loading…
Add table
Add a link
Reference in a new issue