2022-01-14 23:15:51 +01:00
|
|
|
import Image from 'next/image'
|
|
|
|
import classNames from 'classnames'
|
|
|
|
import { EyeOffIcon } from '@heroicons/react/solid'
|
|
|
|
import useTranslation from 'next-translate/useTranslation'
|
|
|
|
|
2022-02-19 23:20:33 +01:00
|
|
|
import { Guild } from '../../../../models/Guild'
|
|
|
|
|
2022-01-14 23:15:51 +01:00
|
|
|
export interface UserProfileGuildsProps {
|
|
|
|
isPublicGuilds?: boolean
|
2022-02-19 23:20:33 +01:00
|
|
|
guilds: Guild[]
|
2022-01-14 23:15:51 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
export const UserProfileGuilds: React.FC<UserProfileGuildsProps> = (props) => {
|
|
|
|
const { isPublicGuilds = false } = props
|
|
|
|
const { t } = useTranslation()
|
|
|
|
|
|
|
|
return (
|
|
|
|
<div
|
|
|
|
className={classNames('relative cursor-pointer', {
|
|
|
|
'cursor-auto': !isPublicGuilds
|
|
|
|
})}
|
|
|
|
>
|
|
|
|
<div
|
|
|
|
className={classNames('flex -space-x-7', {
|
2022-02-19 23:20:33 +01:00
|
|
|
'select-none blur-lg': !isPublicGuilds
|
2022-01-14 23:15:51 +01:00
|
|
|
})}
|
|
|
|
>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_1.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_2.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_3.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_4.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_5.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='flex items-center justify-center rounded-full drop-shadow-lg filter'>
|
2022-01-14 23:15:51 +01:00
|
|
|
<Image
|
|
|
|
className='rounded-full'
|
|
|
|
src='/images/guilds/Guild_6.svg'
|
|
|
|
alt={'Profil Picture'}
|
|
|
|
draggable='false'
|
|
|
|
height={60}
|
|
|
|
width={60}
|
|
|
|
/>
|
|
|
|
</div>
|
2022-02-19 23:20:33 +01:00
|
|
|
<div className='z-10 flex h-[60px] w-[60px] items-center justify-center rounded-full bg-gray-300 drop-shadow-lg filter dark:bg-gray-800'>
|
|
|
|
<span className='select-none text-xl font-bold text-black dark:text-white'>
|
2022-01-14 23:15:51 +01:00
|
|
|
+4
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div
|
|
|
|
className={classNames(
|
2022-02-19 23:20:33 +01:00
|
|
|
'absolute top-1/2 flex -translate-y-1/2 items-center',
|
2022-01-14 23:15:51 +01:00
|
|
|
{ hidden: isPublicGuilds }
|
|
|
|
)}
|
|
|
|
>
|
|
|
|
<EyeOffIcon height={25} />
|
2022-02-19 23:20:33 +01:00
|
|
|
<p className='ml-4 drop-shadow-2xl'>
|
2022-01-14 23:15:51 +01:00
|
|
|
{t('application:private-user-guilds-list')}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
}
|