feat: add indicator for the owner of the guild (#29)

This commit is contained in:
Walid 2022-04-10 16:47:21 +00:00 committed by GitHub
parent 41e9162454
commit 4cd817bb01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 12 deletions

View File

@ -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()
})
})

View File

@ -2,6 +2,7 @@ import Image from 'next/image'
import Link from 'next/link'
import { MemberWithPublicUser } from '../../../../models/Member'
import { Emoji } from '../../../Emoji'
export interface MemberProps {
member: MemberWithPublicUser
@ -29,8 +30,13 @@ export const Member: React.FC<MemberProps> = (props) => {
/>
</div>
<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.isOwner && (
<span className='ml-4'>
<Emoji value=':crown:' size={18} />
</span>
)}
</p>
{member.user.status != null && member.user.status}
</div>