mirror of
https://github.com/getredash/redash.git
synced 2026-05-13 06:00:53 -04:00
* Create React version for the EmailSettingsWarning * Migrate the Create User Page * Migrate UserProfile to React * Add /users/me to the routes (Percy ftw) * Fix UserShow test spec * Remove Error Messages component * Show invitation link if email server not setup (#3519) * return invite link to client if e-mail server is not set up * add a couple of tests to make sure invite links are only returned when neccessary * show invite link when e-mail is not configured * remove "an e-mail has been sent" when there's no e-mail configured * return invite_url in re-invites as well. Also refactor to reuse the code. * Use CreateUserDialog instead of Page * Render invite link on Resend Invitation click * Add email validation to DynamicForm * Fix EmailWarning position + update user list with user creation success * Fix console error on UserProfile * Redirect from /users/new + rename createUser -> showCreateUserDialog * Use alert instead of toastr for user creation errors * Remove logic from CreateUserDialog * CR * Use Promise.reject instead of throw to avoid console error
31 lines
636 B
JavaScript
31 lines
636 B
JavaScript
import React from 'react';
|
|
import { UserProfile } from '../proptypes';
|
|
|
|
export default function UserShow({ user: { name, email, profileImageUrl } }) {
|
|
return (
|
|
<div className="col-md-4 col-md-offset-4 profile__container">
|
|
<img
|
|
alt="profile"
|
|
src={profileImageUrl}
|
|
className="profile__image"
|
|
width="40"
|
|
/>
|
|
|
|
<h3 className="profile__h3">{name}</h3>
|
|
|
|
<hr />
|
|
|
|
<dl className="profile__dl">
|
|
<dt>Name:</dt>
|
|
<dd>{name}</dd>
|
|
<dt>Email:</dt>
|
|
<dd>{email}</dd>
|
|
</dl>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
UserShow.propTypes = {
|
|
user: UserProfile.isRequired,
|
|
};
|