forked from sk1982/actaeon
fix: missing key and type import
This commit is contained in:
parent
baf1898d23
commit
4f4a23cc2d
@ -146,7 +146,7 @@ export const AdminUserList = ({ users: initialUsers }: { users: AdminUser[]; })
|
||||
}
|
||||
|
||||
{[...USER_PERMISSION_NAMES].filter(([permission]) => userEntry.permissions! & (1 << permission))
|
||||
.map(([permission]) => <PermissionIcon className="w-6 h-6 ml-2" permission={permission} />)}
|
||||
.map(([permission]) => <PermissionIcon className="w-6 h-6 ml-2" permission={permission} key={permission} />)}
|
||||
|
||||
<Spacer className="flex-grow" />
|
||||
|
||||
|
@ -17,6 +17,7 @@ import { useState } from 'react';
|
||||
import { useConfirmModal } from '@/components/confirm-modal';
|
||||
import { useRouter } from 'next/navigation';
|
||||
import { ChuniPenguinIcon } from '@/components/chuni/chuni-penguin-icon';
|
||||
import { DB } from '@/types/db';
|
||||
|
||||
export type UserProfile<V extends boolean> = Pick<UserPayload, 'username' | 'id' | 'uuid' | 'permissions'> & Pick<DBUserPayload, 'created_date' | 'last_login_date'> & { visible: V; };
|
||||
type UserFriend = Pick<DB['actaeon_user_friends'], 'chuniRival'> | null | undefined;
|
||||
@ -53,7 +54,7 @@ export const UserProfile = <T extends boolean>(props: UserProfileProps<T>) => {
|
||||
</Tooltip>}
|
||||
<span>{props.user.username}</span>
|
||||
{[...USER_PERMISSION_NAMES].filter(([permission]) => props.user.permissions! & (1 << permission))
|
||||
.map(([permission]) => <PermissionIcon permission={permission} className="ml-2.5 h-7 w-7" />)}
|
||||
.map(([permission]) => <PermissionIcon key={permission} permission={permission} className="ml-2.5 h-7 w-7" />)}
|
||||
</div>
|
||||
|
||||
<div className="ml-auto flex gap-2">
|
||||
|
Loading…
Reference in New Issue
Block a user