Merged in feature-country-manager-flag (pull request #11)
Feature country manager flag Approved-by: Tiago Ribeiro
This commit is contained in:
@@ -361,26 +361,37 @@ export default function Home() {
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div className="flex flex-col gap-6 w-48">
|
||||||
className="flex flex-col gap-3 items-center w-48 h-fit cursor-pointer group"
|
<div
|
||||||
onClick={() => (profilePictureInput.current as any)?.click()}>
|
className="flex flex-col gap-3 items-center h-fit cursor-pointer group"
|
||||||
<div className="relative overflow-hidden h-48 w-48 rounded-full">
|
onClick={() => (profilePictureInput.current as any)?.click()}>
|
||||||
<div
|
<div className="relative overflow-hidden h-48 w-48 rounded-full">
|
||||||
className={clsx(
|
<div
|
||||||
"absolute top-0 left-0 bg-mti-purple-light/60 w-full h-full z-20 flex items-center justify-center opacity-0 group-hover:opacity-100",
|
className={clsx(
|
||||||
"transition ease-in-out duration-300",
|
"absolute top-0 left-0 bg-mti-purple-light/60 w-full h-full z-20 flex items-center justify-center opacity-0 group-hover:opacity-100",
|
||||||
)}>
|
"transition ease-in-out duration-300",
|
||||||
<BsCamera className="text-6xl text-mti-purple-ultralight/80" />
|
)}>
|
||||||
|
<BsCamera className="text-6xl text-mti-purple-ultralight/80" />
|
||||||
|
</div>
|
||||||
|
<img src={profilePicture} alt={user.name} className="aspect-square drop-shadow-xl self-end object-cover" />
|
||||||
</div>
|
</div>
|
||||||
<img src={profilePicture} alt={user.name} className="aspect-square drop-shadow-xl self-end object-cover" />
|
<input type="file" className="hidden" onChange={uploadProfilePicture} accept="image/*" ref={profilePictureInput} />
|
||||||
|
<span
|
||||||
|
onClick={() => (profilePictureInput.current as any)?.click()}
|
||||||
|
className="cursor-pointer text-mti-purple-light text-sm">
|
||||||
|
Change picture
|
||||||
|
</span>
|
||||||
|
<h6 className="font-normal text-base text-mti-gray-taupe">{USER_TYPE_LABELS[user.type]}</h6>
|
||||||
</div>
|
</div>
|
||||||
<input type="file" className="hidden" onChange={uploadProfilePicture} accept="image/*" ref={profilePictureInput} />
|
{user.type === 'agent' && (
|
||||||
<span
|
<div className="flag items-center h-fit">
|
||||||
onClick={() => (profilePictureInput.current as any)?.click()}
|
<img
|
||||||
className="cursor-pointer text-mti-purple-light text-sm">
|
alt={user.demographicInformation?.country.toLowerCase() + '_flag'}
|
||||||
Change picture
|
src={`https://flagcdn.com/w320/${user.demographicInformation?.country.toLowerCase()}.png`}
|
||||||
</span>
|
width="320"
|
||||||
<h6 className="font-normal text-base text-mti-gray-taupe">{USER_TYPE_LABELS[user.type]}</h6>
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex flex-col gap-4 mt-8 mb-20">
|
<div className="flex flex-col gap-4 mt-8 mb-20">
|
||||||
|
|||||||
Reference in New Issue
Block a user