Gabe Lyons dcefd96b4a
feat(React Incubation): User Profile (#2083)
* feat(react incubation): user profile w/ mock data

* removing spurious build-and-test change

* fixing CI issues
2021-02-05 14:21:04 -08:00

26 lines
703 B
TypeScript

import * as React from 'react';
import { CorpUser, EntityType } from '../../../types.generated';
import { Entity, PreviewType } from '../Entity';
import UserProfile from './UserProfile';
/**
* Definition of the DataHub Dataset entity.
*/
export class UserEntity implements Entity<CorpUser> {
type: EntityType = EntityType.User;
isSearchEnabled = () => true;
isBrowseEnabled = () => false;
getAutoCompleteFieldName = () => 'username';
getPathName: () => string = () => 'user';
getCollectionName: () => string = () => 'Users';
renderProfile: (urn: string) => JSX.Element = (_) => <UserProfile />;
renderPreview = (_: PreviewType, _1: CorpUser) => <p>Hello</p>;
}