feat: add indicator for the owner of the guild (#29)
This commit is contained in:
parent
41e9162454
commit
4cd817bb01
@ -1,11 +0,0 @@
|
|||||||
import { render } from '@testing-library/react'
|
|
||||||
|
|
||||||
import { Member } from './Member'
|
|
||||||
import { memberExampleComplete } from '../../../../cypress/fixtures/members/member'
|
|
||||||
|
|
||||||
describe('<Member />', () => {
|
|
||||||
it('should render successfully', () => {
|
|
||||||
const { baseElement } = render(<Member member={memberExampleComplete} />)
|
|
||||||
expect(baseElement).toBeTruthy()
|
|
||||||
})
|
|
||||||
})
|
|
@ -2,6 +2,7 @@ import Image from 'next/image'
|
|||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
|
|
||||||
import { MemberWithPublicUser } from '../../../../models/Member'
|
import { MemberWithPublicUser } from '../../../../models/Member'
|
||||||
|
import { Emoji } from '../../../Emoji'
|
||||||
|
|
||||||
export interface MemberProps {
|
export interface MemberProps {
|
||||||
member: MemberWithPublicUser
|
member: MemberWithPublicUser
|
||||||
@ -29,8 +30,13 @@ export const Member: React.FC<MemberProps> = (props) => {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='ml-5'>
|
<div className='ml-5'>
|
||||||
<p data-cy='member-user-name' className='truncate font-bold'>
|
<p data-cy='member-user-name' className='flex truncate font-bold'>
|
||||||
{member.user.name}
|
{member.user.name}
|
||||||
|
{member.isOwner && (
|
||||||
|
<span className='ml-4'>
|
||||||
|
<Emoji value=':crown:' size={18} />
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
</p>
|
</p>
|
||||||
{member.user.status != null && member.user.status}
|
{member.user.status != null && member.user.status}
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user