added current status to user

This commit is contained in:
Ren Amamiya
2023-02-23 14:57:39 +07:00
parent 1796228116
commit 31a3a712ec
7 changed files with 23 additions and 15 deletions

View File

@@ -5,8 +5,13 @@ import { memo } from 'react';
export const Account = memo(function Account({ user, current }: { user: any; current: string }) {
const userData = JSON.parse(user.metadata);
const setCurrentUser = () => {
console.log('clicked');
};
return (
<div
<button
onClick={() => setCurrentUser()}
className={`relative h-11 w-11 shrink overflow-hidden rounded-full ${
current === user.pubkey ? 'ring-1 ring-fuchsia-500 ring-offset-4 ring-offset-black' : ''
}`}>
@@ -20,6 +25,6 @@ export const Account = memo(function Account({ user, current }: { user: any; cur
) : (
<div className="h-11 w-11 animate-pulse rounded-full bg-zinc-700" />
)}
</div>
</button>
);
});