mirror of
https://github.com/getredash/redash.git
synced 2025-12-25 01:03:20 -05:00
* DynamicComponent for QuerySourceAlerts * General Settings updates * Dynamic Date[Range] updates * EmptyState updates * Query and SchemaBrowser updates * Adjust page headers and add disablePublish * Policy updates * Separate Home FavoritesList component * Update FormatQuery * Autolimit frontend fixes * Misc updates * Keep registering of QuerySourceDropdown * Undo changes in DynamicComponent * Change sql-formatter package.json syntax * Allow opening help trigger in new tab * Don't run npm commands as root in Dockerfile * Cypress: Remove extra execute query
30 lines
913 B
JavaScript
30 lines
913 B
JavaScript
import React from "react";
|
|
import { UserProfile } from "@/components/proptypes";
|
|
import UserGroups from "@/components/UserGroups";
|
|
|
|
import useUserGroups from "../hooks/useUserGroups";
|
|
|
|
export default function ReadOnlyUserProfile({ user }) {
|
|
const { groups, isLoading: isLoadingGroups } = useUserGroups(user);
|
|
|
|
return (
|
|
<div className="col-md-4 col-md-offset-4 profile__container">
|
|
<img alt="profile" src={user.profileImageUrl} className="profile__image" width="40" />
|
|
<h3 className="profile__h3">{user.name}</h3>
|
|
<hr />
|
|
<dl className="profile__dl">
|
|
<dt>Name:</dt>
|
|
<dd>{user.name}</dd>
|
|
<dt>Email:</dt>
|
|
<dd>{user.email}</dd>
|
|
<dt className="m-b-5">Groups:</dt>
|
|
<dd>{isLoadingGroups ? "Loading..." : <UserGroups groups={groups} />}</dd>
|
|
</dl>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
ReadOnlyUserProfile.propTypes = {
|
|
user: UserProfile.isRequired,
|
|
};
|