feat: light mode user icon
This commit is contained in:
parent
83b4b4476a
commit
73004dc2d8
4 changed files with 15 additions and 3 deletions
|
@ -1,6 +1,8 @@
|
|||
import React from 'react';
|
||||
import Image from 'next/image';
|
||||
import { defaultusericon } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { user_default_dark } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { user_default_light } from '@/assets/usericon/default/defaultusericon-export';
|
||||
import { useTheme } from 'next-themes';
|
||||
|
||||
type ParticipantListEntryProps = {
|
||||
participant: string;
|
||||
|
@ -10,9 +12,13 @@ type ParticipantListEntryProps = {
|
|||
export default function ParticipantListEntry({
|
||||
participant,
|
||||
}: ParticipantListEntryProps) {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
||||
const iconSrc =
|
||||
resolvedTheme === 'dark' ? user_default_dark : user_default_light;
|
||||
return (
|
||||
<div className='flex items-center gap-2 py-1 ml-5'>
|
||||
<Image src={defaultusericon} alt='Avatar' width={30} height={30} />
|
||||
<Image src={iconSrc} alt='Avatar' width={30} height={30} />
|
||||
<span>{participant}</span>
|
||||
</div>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue