-
- {actions.map((action, index) => (
-
-
-
{action.label}
-
- ))}
-
+ {currentAction !== 'send' && currentAction !== 'swap' && (
+
+
+
+ {actions.map((action, index) => (
+
+
+
{action.label}
+
+ ))}
+
-
-
+
+
-
+
+
-
-
-
-
- You don't have any assets yet!
-
-
- Start by buying or depositing funds:
-
-
-
-
+
+
+
+ You don't have any assets yet!
+
+
+ Start by buying or depositing funds:
+
+
+
+
+
-
- }
-
- {/*Now depends on current action render the components */}
- {currentAction === 'receive' &&
}
- {currentAction === 'swap' && }
- {currentAction === 'send' && }
+ )}
+ {/*Now depends on current action render the components */}
+ {currentAction === 'receive' && (
+
+ )}
+ {currentAction === 'swap' && }
+ {currentAction === 'send' && }
)
}
diff --git a/src/components/common/ProfileDropDown.tsx b/src/components/common/ProfileDropDown.tsx
index e3deb73..258a794 100644
--- a/src/components/common/ProfileDropDown.tsx
+++ b/src/components/common/ProfileDropDown.tsx
@@ -1,89 +1,91 @@
import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuLabel,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from '@/components/ui/dropdown-menu';
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from '@/components/ui/dropdown-menu'
import UserImage from '@/components/Appbar/UserImage'
import { LogOut, UserRound } from 'lucide-react'
import { signOut, useSession } from 'next-auth/react'
-import { useRouter } from 'next/navigation';
+import { useRouter } from 'next/navigation'
const ProfileDropDown = () => {
- const { data } = useSession();
- const router = useRouter();
+ const { data } = useSession()
+ const router = useRouter()
- const dropDownData = [
- {
- name: 'Profile',
- icon:
,
- href: '/profile',
- }
- ]
+ const dropDownData = [
+ {
+ name: 'Profile',
+ icon:
,
+ href: '/profile',
+ },
+ ]
- return <>
-
-
- {!data?.user?.image ? (
-
-
-
- ) : (
-
- )}
-
+ return (
+ <>
+
+
+ {!data?.user?.image ? (
+
+
+
+ ) : (
+
+ )}
+
-
-
-
- {!data?.user?.image ? (
-
-
-
- ) : (
-
- )}
-
+
+
+
+ {!data?.user?.image ? (
+
+
+
+ ) : (
+
+ )}
+
-
- {data?.user?.name}
-
- {data?.user?.email}
-
-
-
-
+
+ {data?.user?.name}
+
+ {data?.user?.email}
+
+
+
+
- {dropDownData.map((item, index) => {
- return (
- router.push('/profile')}
- key={index}
- >
- {item.icon}
- {item.name}
-
- )
- })}
-
- {data?.user && (
- {
- await signOut()
- router.push('/')
- }}
- className="flex gap-2 cursor-pointer text-black/70 hover:text-black transition"
- >
-
- Logout
-
- )}
-
-
+ {dropDownData.map((item, index) => {
+ return (
+ router.push('/profile')}
+ key={index}
+ >
+ {item.icon}
+ {item.name}
+
+ )
+ })}
+
+ {data?.user && (
+ {
+ await signOut()
+ router.push('/')
+ }}
+ className="flex gap-2 cursor-pointer dark:text-white/70 text-black/70 hover:text-black transition"
+ >
+
+ Logout
+
+ )}
+
+
>
+ )
}
-export default ProfileDropDown;
\ No newline at end of file
+export default ProfileDropDown