diff --git a/src/app/globals.css b/src/app/globals.css index 8267f75..f1c3f0b 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -74,6 +74,13 @@ input::-webkit-inner-spin-button { } /* Firefox */ -input[type=number] { +input[type='number'] { -moz-appearance: textfield; -} \ No newline at end of file +} + +.dark .fill-current { + fill: #ffffff; +} +.fill-current { + fill: #000000; +} diff --git a/src/app/wallet-adapter/page.tsx b/src/app/wallet-adapter/page.tsx index 3ffd6db..4d979e2 100644 --- a/src/app/wallet-adapter/page.tsx +++ b/src/app/wallet-adapter/page.tsx @@ -79,7 +79,7 @@ const page = () => {
-
+
@@ -87,7 +87,9 @@ const page = () => {

Making Solana apps - consumer ready + + consumer ready +

Let your users login with just a Google account and start @@ -104,14 +106,14 @@ const page = () => {

-
+

Key Features

{features.map((feature, index) => (
diff --git a/src/app/wallet/page.tsx b/src/app/wallet/page.tsx index 9f1fbaa..ee0fc10 100644 --- a/src/app/wallet/page.tsx +++ b/src/app/wallet/page.tsx @@ -18,13 +18,12 @@ const Wallet = async () => { }, }) if (user) { - wallet = user?.publicKey ? user.publicKey : await createWallet(user) + wallet = user?.publicKey ? user.publicKey : await createWallet(user) balance = await fetchUserBalance(wallet) console.log(balance) } } - return (
@@ -33,7 +32,11 @@ const Wallet = async () => {
- +
{/* */}
diff --git a/src/components/WalletPage/LeftSideBar.tsx b/src/components/WalletPage/LeftSideBar.tsx index f7a3f33..0a90d71 100644 --- a/src/components/WalletPage/LeftSideBar.tsx +++ b/src/components/WalletPage/LeftSideBar.tsx @@ -76,8 +76,10 @@ const LeftSideBar = () => {
-

{getEquivalentAmount()}

+

+ {getEquivalentAmount()} +

{quickSelectAmounts.map((quickAmount) => ( - ))}
- + ) -} \ No newline at end of file +} diff --git a/src/components/WalletPage/Send/Send.tsx b/src/components/WalletPage/Send/Send.tsx index fb4ccff..f310987 100644 --- a/src/components/WalletPage/Send/Send.tsx +++ b/src/components/WalletPage/Send/Send.tsx @@ -1,74 +1,92 @@ 'use client' -import { Button } from "@/components/ui/button" -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card" -import { ChevronRight, Wand2, Wallet } from "lucide-react" -import { useState } from "react" -import LinkTransfer from "./LinkTransfer" -import WalletTransfer from "./WalletTransfer" -import { ActionType } from "../actions"; - - - +import { Button } from '@/components/ui/button' +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from '@/components/ui/card' +import { ChevronRight, Wand2, Wallet } from 'lucide-react' +import { useState } from 'react' +import LinkTransfer from './LinkTransfer' +import WalletTransfer from './WalletTransfer' +import { ActionType } from '../actions' interface SendTokenProps { - setCurrent: (action: ActionType | null) => void; - } + setCurrent: (action: ActionType | null) => void +} export default function SendToken({ setCurrent }: SendTokenProps) { + const [typeOfSend, setTypeOfSend] = useState('') + return ( + <> + {!typeOfSend && ( +
+

+ Send +

+

+ Send assets to a new TipLink or to a Solana wallet address: +

+ + + + + + + +
+ )} - const [typeOfSend, setTypeOfSend] = useState(''); - return ( - <> - { - !typeOfSend &&
-

Send

-

- Send assets to a new TipLink or to a Solana wallet address: -

- - - - - - - -
- } - - - { - typeOfSend === 'type1' && setTypeOfSend('')}/> - } + {typeOfSend === 'type1' && ( + setTypeOfSend('')} /> + )} - { - typeOfSend === 'type2' && setTypeOfSend('')}/> - } - - - ) -} \ No newline at end of file + {typeOfSend === 'type2' && ( + setTypeOfSend('')} /> + )} + + ) +} diff --git a/src/components/WalletPage/Send/WalletTransfer.tsx b/src/components/WalletPage/Send/WalletTransfer.tsx index 8856509..af9d29e 100644 --- a/src/components/WalletPage/Send/WalletTransfer.tsx +++ b/src/components/WalletPage/Send/WalletTransfer.tsx @@ -5,7 +5,7 @@ const WalletTransfer = ({ setType }: { setType: () => void }) => { return (
@@ -13,7 +13,7 @@ const WalletTransfer = ({ setType }: { setType: () => void }) => {
- + Send to solana wallet address @@ -46,7 +46,10 @@ const WalletTransfer = ({ setType }: { setType: () => void }) => {

- -

Swap Tokens

-
-
-} \ No newline at end of file + return ( +
+ +

Swap Tokens

+
+
+ ) +} diff --git a/src/components/WalletPage/TopBar.tsx b/src/components/WalletPage/TopBar.tsx index 578f0ce..8e1db5b 100644 --- a/src/components/WalletPage/TopBar.tsx +++ b/src/components/WalletPage/TopBar.tsx @@ -18,7 +18,7 @@ const TopBar = () => { {/* */} setOpen(!open)} className="sm:hidden" />
- +
@@ -32,11 +32,17 @@ const TopBar = () => { )}
-
- - +
+ +
- {data && data?.user ? : ( + + {data && data?.user ? ( + + ) : (
diff --git a/src/components/WalletPage/WalletDetail.tsx b/src/components/WalletPage/WalletDetail.tsx index 82a43c8..7ce75ca 100644 --- a/src/components/WalletPage/WalletDetail.tsx +++ b/src/components/WalletPage/WalletDetail.tsx @@ -11,92 +11,94 @@ export interface WalletDetailProps { solbalance?: number } -const WalletDetail = ({ wallet, usdbalance , solbalance}: WalletDetailProps) => { - const [currentAction, setCurrentAction] = useState(null); +const WalletDetail = ({ + wallet, + usdbalance, + solbalance, +}: WalletDetailProps) => { + const [currentAction, setCurrentAction] = useState(null) const handleActionClick = (action: ActionType) => { - setCurrentAction(action) - - }; - + setCurrentAction(action) + } const handleClose = () => { - setCurrentAction(null); + setCurrentAction(null) } - return ( -
+

Total Balance

-
- {(solbalance === null || isNaN(Number(usdbalance))) ? ( +
+ {solbalance === null || isNaN(Number(usdbalance)) ? (
{''}
) : ( -
-
$ {usdbalance}
-
{solbalance} SOL
-
+
+
$ {usdbalance}
+
{solbalance} SOL
+
)}
- {(currentAction !== 'send' && currentAction !== 'swap' ) && -
-
-
- {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