You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
871 B
TypeScript
39 lines
871 B
TypeScript
import React from 'react';
|
|
|
|
interface Props {
|
|
identityKey: string;
|
|
name?: string;
|
|
onEditProfile: () => void;
|
|
}
|
|
|
|
export class IdentityKeyHeader extends React.Component<Props> {
|
|
public render() {
|
|
const {
|
|
name,
|
|
identityKey,
|
|
onEditProfile,
|
|
} = this.props;
|
|
|
|
return (
|
|
<div className='identity-key-container'>
|
|
<div className='identity-key-text-container'>
|
|
<div>
|
|
Your identity key: <span className='identity-key_bold'>{identityKey}</span>
|
|
</div>
|
|
{!!name &&
|
|
<div>
|
|
Your display name: <span className='identity-key_bold'>{name}</span>
|
|
</div>
|
|
}
|
|
</div>
|
|
<div
|
|
id='editProfile'
|
|
role="button"
|
|
onClick={onEditProfile}
|
|
className="identity-key-wrapper__pencil-icon"
|
|
/>
|
|
</div>
|
|
);
|
|
}
|
|
}
|