From 2a2093b8b6d65303e4ade7b4e91170def2ffd874 Mon Sep 17 00:00:00 2001 From: AlanRacciatti Date: Wed, 25 Oct 2023 14:23:52 -0300 Subject: [PATCH] feat: improve privy's connect wallet btn UI --- app/(general)/integration/disco/page.tsx | 2 +- app/(general)/integration/erc1155/page.tsx | 2 +- app/(general)/integration/erc20/page.tsx | 2 +- app/(general)/integration/erc721/page.tsx | 2 +- app/(general)/integration/etherscan/page.tsx | 2 +- app/(general)/integration/gelato/page.tsx | 2 +- .../integration/gitcoin-passport/page.tsx | 2 +- .../gitcoin-passport/score-gated/page.tsx | 2 +- .../gitcoin-passport/stamp-gated/page.tsx | 2 +- .../integration/lens-protocol/layout.tsx | 2 +- .../integration/lit-protocol/page.tsx | 2 +- .../integration/pooltogether-v4/page.tsx | 2 +- .../integration/push-protocol/page.tsx | 2 +- .../sign-in-with-ethereum/page.tsx | 2 +- app/(general)/layout.tsx | 2 +- app/admin/layout.tsx | 66 +++++++++++++------ app/dashboard/layout.tsx | 3 +- app/layout.tsx | 4 +- components/layout/dashboard-header.tsx | 40 ++++++----- components/shared/example-demos.tsx | 2 +- .../erc20/components/erc20-write-transfer.tsx | 2 +- .../components/form-lit-decrypt-message.tsx | 2 +- .../components/form-lit-encrypt-message.tsx | 2 +- integrations/privy/wallet-connect.tsx | 59 ++++++++++++----- 24 files changed, 134 insertions(+), 76 deletions(-) diff --git a/app/(general)/integration/disco/page.tsx b/app/(general)/integration/disco/page.tsx index ea1ddc79..ee611fbe 100644 --- a/app/(general)/integration/disco/page.tsx +++ b/app/(general)/integration/disco/page.tsx @@ -10,7 +10,6 @@ import { buttonVariants } from "@/components/ui/button" import { Card, CardContent, CardHeader } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -24,6 +23,7 @@ import { LightDarkImage } from "@/components/shared/light-dark-image" import { DiscoProfileBasic } from "@/integrations/disco/components/disco-profile-basic" import { DiscoProfileCredentials } from "@/integrations/disco/components/disco-profile-credentials" import { FormCredentialIssuanceProofOfHack } from "@/integrations/disco/components/form-issue-proof-of-hack" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" import { IsSignedOut } from "@/integrations/siwe/components/is-signed-out" diff --git a/app/(general)/integration/erc1155/page.tsx b/app/(general)/integration/erc1155/page.tsx index 809a8f71..4e8a0d14 100644 --- a/app/(general)/integration/erc1155/page.tsx +++ b/app/(general)/integration/erc1155/page.tsx @@ -6,7 +6,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -28,6 +27,7 @@ import { } from "@/integrations/erc1155" import { Erc1155SetTokenStorage } from "@/integrations/erc1155/components/erc1155-set-token-storage" import { useErc1155TokenStorage } from "@/integrations/erc1155/hooks/use-erc1155-token-storage" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" const integrationData = turboIntegrations.erc1155 diff --git a/app/(general)/integration/erc20/page.tsx b/app/(general)/integration/erc20/page.tsx index 9bb82594..b87d63df 100644 --- a/app/(general)/integration/erc20/page.tsx +++ b/app/(general)/integration/erc20/page.tsx @@ -7,7 +7,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -24,6 +23,7 @@ import { Erc20SetTokenStorage } from "@/integrations/erc20/components/erc20-set- import { ERC20WriteMint } from "@/integrations/erc20/components/erc20-write-mint" import { ERC20WriteTransfer } from "@/integrations/erc20/components/erc20-write-transfer" import { useERC20TokenStorage } from "@/integrations/erc20/hooks/use-erc20-token-storage" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function Erc20Page() { const [token] = useERC20TokenStorage() diff --git a/app/(general)/integration/erc721/page.tsx b/app/(general)/integration/erc721/page.tsx index 9a1d8e66..6202af75 100644 --- a/app/(general)/integration/erc721/page.tsx +++ b/app/(general)/integration/erc721/page.tsx @@ -6,7 +6,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -26,6 +25,7 @@ import { } from "@/integrations/erc721" import { Erc721SetTokenStorage } from "@/integrations/erc721/components/erc721-set-token-storage" import { useErc721TokenStorage } from "@/integrations/erc721/hooks/use-erc721-token-storage" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function ERC721Page() { const [token] = useErc721TokenStorage() diff --git a/app/(general)/integration/etherscan/page.tsx b/app/(general)/integration/etherscan/page.tsx index 09078231..5dc53f87 100644 --- a/app/(general)/integration/etherscan/page.tsx +++ b/app/(general)/integration/etherscan/page.tsx @@ -8,7 +8,6 @@ import { useNetwork } from "wagmi" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { Card, CardContent } from "@/components/ui/card" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -21,6 +20,7 @@ import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected import { LightDarkImage } from "@/components/shared/light-dark-image" import TransactionsTable from "@/integrations/etherscan/components/transactions-table" import { useEtherscanAccountTransactions } from "@/integrations/etherscan/hooks/use-etherscan-account-transactions" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" import { IsSignedOut } from "@/integrations/siwe/components/is-signed-out" diff --git a/app/(general)/integration/gelato/page.tsx b/app/(general)/integration/gelato/page.tsx index ddb8b726..a335be2f 100644 --- a/app/(general)/integration/gelato/page.tsx +++ b/app/(general)/integration/gelato/page.tsx @@ -7,7 +7,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -19,6 +18,7 @@ import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { LightDarkImage } from "@/components/shared/light-dark-image" import { ActiveTasks, useIsAutomateSupported } from "@/integrations/gelato" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function GelatoPage() { const isAutomateSupported = useIsAutomateSupported() diff --git a/app/(general)/integration/gitcoin-passport/page.tsx b/app/(general)/integration/gitcoin-passport/page.tsx index a7a22b71..8b312673 100644 --- a/app/(general)/integration/gitcoin-passport/page.tsx +++ b/app/(general)/integration/gitcoin-passport/page.tsx @@ -1,9 +1,9 @@ "use client" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { ListStamps } from "@/integrations/gitcoin-passport/components/list-stamps" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function PageIntegration() { return ( diff --git a/app/(general)/integration/gitcoin-passport/score-gated/page.tsx b/app/(general)/integration/gitcoin-passport/score-gated/page.tsx index 62fcf34c..814d31c7 100644 --- a/app/(general)/integration/gitcoin-passport/score-gated/page.tsx +++ b/app/(general)/integration/gitcoin-passport/score-gated/page.tsx @@ -1,10 +1,10 @@ "use client" import { Card, CardContent, CardTitle } from "@/components/ui/card" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { ScoreGate } from "@/integrations/gitcoin-passport/components/score-gate" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function PageIntegration() { return ( diff --git a/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx b/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx index f38b9a37..928e9e46 100644 --- a/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx +++ b/app/(general)/integration/gitcoin-passport/stamp-gated/page.tsx @@ -1,10 +1,10 @@ "use client" import { Card, CardContent, CardTitle } from "@/components/ui/card" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { StampGate } from "@/integrations/gitcoin-passport/components/stamp-gate" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function PageIntegration() { return ( diff --git a/app/(general)/integration/lens-protocol/layout.tsx b/app/(general)/integration/lens-protocol/layout.tsx index 7949c050..44937fcb 100644 --- a/app/(general)/integration/lens-protocol/layout.tsx +++ b/app/(general)/integration/lens-protocol/layout.tsx @@ -8,7 +8,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -21,6 +20,7 @@ import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected import { LightDarkImage } from "@/components/shared/light-dark-image" import { Navbar } from "@/integrations/lens-protocol/components/navbar" import { lensProviderConfig } from "@/integrations/lens-protocol/lens-provider" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function LayoutIntegration({ children, diff --git a/app/(general)/integration/lit-protocol/page.tsx b/app/(general)/integration/lit-protocol/page.tsx index 5a1dbbee..e37417e3 100644 --- a/app/(general)/integration/lit-protocol/page.tsx +++ b/app/(general)/integration/lit-protocol/page.tsx @@ -8,7 +8,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -21,6 +20,7 @@ import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected import { LightDarkImage } from "@/components/shared/light-dark-image" import { FormLitDecryptMessage } from "@/integrations/lit-protocol/components/form-lit-decrypt-message" import { FormLitEncryptMessage } from "@/integrations/lit-protocol/components/form-lit-encrypt-message" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function LitProtocolPage() { const searchParams = useSearchParams() diff --git a/app/(general)/integration/pooltogether-v4/page.tsx b/app/(general)/integration/pooltogether-v4/page.tsx index 036edc94..b04c5f9b 100644 --- a/app/(general)/integration/pooltogether-v4/page.tsx +++ b/app/(general)/integration/pooltogether-v4/page.tsx @@ -5,7 +5,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -18,6 +17,7 @@ import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected import { LightDarkImage } from "@/components/shared/light-dark-image" import { PoolTogetherFormDeposit } from "@/integrations/pooltogether-v4/components/form-yield-source-prize-pool-deposit" import { PoolTogetherFormWithdraw } from "@/integrations/pooltogether-v4/components/form-yield-source-prize-pool-withdraw" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function PoolTogetherPage() { return ( diff --git a/app/(general)/integration/push-protocol/page.tsx b/app/(general)/integration/push-protocol/page.tsx index c503657d..3b635cb1 100644 --- a/app/(general)/integration/push-protocol/page.tsx +++ b/app/(general)/integration/push-protocol/page.tsx @@ -18,7 +18,6 @@ import { SelectValue, } from "@/components/ui/select" import { Separator } from "@/components/ui/separator" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -37,6 +36,7 @@ import { NotificationBell, } from "@/integrations/push-protocol" import { PUSH_CHANNEL_ADDRESS } from "@/integrations/push-protocol/utils/constants" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function PushProtocolPage() { const [mockedNotifications, setMockedNotifications] = useState< diff --git a/app/(general)/integration/sign-in-with-ethereum/page.tsx b/app/(general)/integration/sign-in-with-ethereum/page.tsx index 601b9e1e..13b85879 100644 --- a/app/(general)/integration/sign-in-with-ethereum/page.tsx +++ b/app/(general)/integration/sign-in-with-ethereum/page.tsx @@ -4,7 +4,6 @@ import { LuBook } from "react-icons/lu" import { cn } from "@/lib/utils" import { buttonVariants } from "@/components/ui/button" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageHeader, PageHeaderCTA, @@ -15,6 +14,7 @@ import { PageSection } from "@/components/layout/page-section" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { LightDarkImage } from "@/components/shared/light-dark-image" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" import { ButtonSIWELogout } from "@/integrations/siwe/components/button-siwe-logout" import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" diff --git a/app/(general)/layout.tsx b/app/(general)/layout.tsx index 06879328..6ca835c6 100644 --- a/app/(general)/layout.tsx +++ b/app/(general)/layout.tsx @@ -3,7 +3,7 @@ import { ReactNode } from "react" import { NetworkStatus } from "@/components/blockchain/network-status" import { Footer } from "@/components/layout/footer" import { SiteHeader } from "@/components/layout/site-header" -import { WalletConnect } from '@/integrations/rainbow-kit/wallet-connect' +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" interface RootLayoutProps { children: ReactNode diff --git a/app/admin/layout.tsx b/app/admin/layout.tsx index 3793d49c..d3bb9c64 100644 --- a/app/admin/layout.tsx +++ b/app/admin/layout.tsx @@ -1,20 +1,23 @@ -'use client' +"use client" -import classNames from 'clsx' -import Image from 'next/image' +import Image from "next/image" +import classNames from "clsx" -import { DashboardFooter } from '@/components/layout/dashboard-footer' -import { DashboardHeader } from '@/components/layout/dashboard-header' -import { MenuAdminSidebar } from '@/components/layout/menu-admin-sidebar' -import { UserDropdown } from '@/components/layout/user-dropdown' -import { BranchColorMode } from '@/components/shared/branch-color-mode' -import { LinkComponent } from '@/components/shared/link-component' -import { ResponsiveMobileAndDesktop } from '@/components/shared/responsive-mobile-and-desktop' -import { siteConfig } from '@/config/site' -import { WalletConnect } from '@/integrations/rainbow-kit/wallet-connect' +import { siteConfig } from "@/config/site" +import { DashboardFooter } from "@/components/layout/dashboard-footer" +import { DashboardHeader } from "@/components/layout/dashboard-header" +import { MenuAdminSidebar } from "@/components/layout/menu-admin-sidebar" +import { UserDropdown } from "@/components/layout/user-dropdown" +import { BranchColorMode } from "@/components/shared/branch-color-mode" +import { LinkComponent } from "@/components/shared/link-component" +import { ResponsiveMobileAndDesktop } from "@/components/shared/responsive-mobile-and-desktop" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" export default function AdminLayout({ children }: any) { - const classes = classNames('AdminLayout', 'bg-gradient-dark h-screen lg:grid lg:grid-cols-12') + const classes = classNames( + "AdminLayout", + "bg-gradient-dark h-screen lg:grid lg:grid-cols-12" + ) return ( <>
@@ -24,8 +27,18 @@ export default function AdminLayout({ children }: any) {
- Logo - Logo + Logo + Logo
@@ -37,10 +50,22 @@ export default function AdminLayout({ children }: any) {
- Logo - Logo + Logo + Logo -

{siteConfig.name}

+

+ {siteConfig.name} +

@@ -48,7 +73,10 @@ export default function AdminLayout({ children }: any) {
- + Dashboard
diff --git a/app/dashboard/layout.tsx b/app/dashboard/layout.tsx index 21579218..e3829ed8 100644 --- a/app/dashboard/layout.tsx +++ b/app/dashboard/layout.tsx @@ -7,13 +7,12 @@ import { siteConfig } from "@/config/site" import { ScrollArea } from "@/components/ui/scroll-area" import { SidebarNav } from "@/components/layout/sidebar-nav" import { SiteHeader } from "@/components/layout/site-header" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" interface DashboardLayoutProps { children: React.ReactNode } -import { WalletConnect } from '@/integrations/rainbow-kit/wallet-connect' - export default function DashboardLayout({ children }: DashboardLayoutProps) { return (
diff --git a/app/layout.tsx b/app/layout.tsx index b4ade089..749056e7 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -3,12 +3,12 @@ import "@/styles/globals.css" import { ReactNode } from "react" import { env } from "@/env.mjs" -import RootProvider from '@/integrations/rainbow-kit/root-provider' -import { cn } from '@/lib/utils' import { siteConfig } from "@/config/site" import { fontSans } from "@/lib/fonts" +import { cn } from "@/lib/utils" import { Toaster } from "@/components/ui/toaster" +import RootProvider from "@/integrations/rainbow-kit/root-provider" const url = env.NEXT_PUBLIC_SITE_URL || "http://localhost:3000" diff --git a/components/layout/dashboard-header.tsx b/components/layout/dashboard-header.tsx index 67eee7e6..95020eb8 100644 --- a/components/layout/dashboard-header.tsx +++ b/components/layout/dashboard-header.tsx @@ -1,31 +1,35 @@ -import { WalletAddress } from '@turbo-eth/core-wagmi' -import classNames from 'clsx' -import { CopyToClipboard } from 'react-copy-to-clipboard' -import { FaCopy } from 'react-icons/fa' -import { useAccount } from 'wagmi' +import { WalletAddress } from "@turbo-eth/core-wagmi" +import classNames from "clsx" +import { CopyToClipboard } from "react-copy-to-clipboard" +import { FaCopy } from "react-icons/fa" +import { useAccount } from "wagmi" -import { BranchIsWalletConnected } from '@/components/shared/branch-is-wallet-connected' -import { WalletConnect } from '@/integrations/rainbow-kit/wallet-connect' -import { BranchIsAuthenticated } from '@/integrations/siwe/components/branch-is-authenticated' -import { ButtonSIWELogin } from '@/integrations/siwe/components/button-siwe-login' -import { ButtonSIWELogout } from '@/integrations/siwe/components/button-siwe-logout' -import { useToast } from '@/lib/hooks/use-toast' +import { useToast } from "@/lib/hooks/use-toast" +import { BranchIsWalletConnected } from "@/components/shared/branch-is-wallet-connected" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" +import { BranchIsAuthenticated } from "@/integrations/siwe/components/branch-is-authenticated" +import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" +import { ButtonSIWELogout } from "@/integrations/siwe/components/button-siwe-logout" -import { ThemeToggle } from '../shared/theme-toggle' +import { ThemeToggle } from "../shared/theme-toggle" interface Props { className?: string } export function DashboardHeader(props: Props) { - const classes = classNames(props.className, 'Header', 'px-6 lg:px-10 py-3 flex items-center w-full') + const classes = classNames( + props.className, + "Header", + "px-6 lg:px-10 py-3 flex items-center w-full" + ) const { address } = useAccount() const { toast, dismiss } = useToast() const handleToast = () => { toast({ - title: 'Addess Copied', - description: 'Your address has been copied to your clipboard.', + title: "Addess Copied", + description: "Your address has been copied to your clipboard.", }) setTimeout(() => { @@ -37,7 +41,11 @@ export function DashboardHeader(props: Props) {
- + diff --git a/components/shared/example-demos.tsx b/components/shared/example-demos.tsx index 51307f73..7a22e7b4 100644 --- a/components/shared/example-demos.tsx +++ b/components/shared/example-demos.tsx @@ -12,7 +12,6 @@ import { cn } from "@/lib/utils" import { fadeUpVariant } from "@/lib/utils/motion" import { buttonVariants } from "@/components/ui/button" import { WalletAddress } from "@/components/blockchain/wallet-address" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { PageSectionGrid } from "@/components/layout/page-section" import { IsDarkTheme } from "@/components/shared/is-dark-theme" import { IsLightTheme } from "@/components/shared/is-light-theme" @@ -25,6 +24,7 @@ import { ERC20Symbol, } from "@/integrations/erc20/components/erc20-read" import { ERC721TokenUriImage, ERC721TokenUriName } from "@/integrations/erc721" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { ButtonSIWELogin } from "@/integrations/siwe/components/button-siwe-login" import { ButtonSIWELogout } from "@/integrations/siwe/components/button-siwe-logout" import { IsSignedIn } from "@/integrations/siwe/components/is-signed-in" diff --git a/integrations/erc20/components/erc20-write-transfer.tsx b/integrations/erc20/components/erc20-write-transfer.tsx index 2956033a..9a763f5c 100644 --- a/integrations/erc20/components/erc20-write-transfer.tsx +++ b/integrations/erc20/components/erc20-write-transfer.tsx @@ -7,9 +7,9 @@ import { Card, CardContent, CardFooter } from "@/components/ui/card" import { Separator } from "@/components/ui/separator" import { ContractWriteButton } from "@/components/blockchain/contract-write-button" import { TransactionStatus } from "@/components/blockchain/transaction-status" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { useErc20Transfer, diff --git a/integrations/lit-protocol/components/form-lit-decrypt-message.tsx b/integrations/lit-protocol/components/form-lit-decrypt-message.tsx index 4099b9ea..1719ce4f 100644 --- a/integrations/lit-protocol/components/form-lit-decrypt-message.tsx +++ b/integrations/lit-protocol/components/form-lit-decrypt-message.tsx @@ -8,9 +8,9 @@ import { useToast } from "@/lib/hooks/use-toast" import { Button } from "@/components/ui/button" import { Card, CardContent, CardFooter } from "@/components/ui/card" import { Textarea } from "@/components/ui/textarea" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { useLitClient } from "../hooks/use-lit-client" diff --git a/integrations/lit-protocol/components/form-lit-encrypt-message.tsx b/integrations/lit-protocol/components/form-lit-encrypt-message.tsx index 69932da4..e91e035b 100644 --- a/integrations/lit-protocol/components/form-lit-encrypt-message.tsx +++ b/integrations/lit-protocol/components/form-lit-encrypt-message.tsx @@ -21,10 +21,10 @@ import { } from "@/components/ui/select" import { Separator } from "@/components/ui/separator" import { Textarea } from "@/components/ui/textarea" -import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { IsWalletConnected } from "@/components/shared/is-wallet-connected" import { IsWalletDisconnected } from "@/components/shared/is-wallet-disconnected" import { LinkComponent } from "@/components/shared/link-component" +import { WalletConnect } from "@/integrations/rainbow-kit/wallet-connect" import { useLitClient } from "../hooks/use-lit-client" import { AccessControlConditions } from "../utils/types" diff --git a/integrations/privy/wallet-connect.tsx b/integrations/privy/wallet-connect.tsx index 3f035f51..25503c6d 100644 --- a/integrations/privy/wallet-connect.tsx +++ b/integrations/privy/wallet-connect.tsx @@ -1,13 +1,18 @@ -'use client' +"use client" -import { HTMLAttributes } from 'react' +import { HTMLAttributes } from "react" +import Link from "next/link" +import { usePrivy, useWallets } from "@privy-io/react-auth" +import { usePrivyWagmi } from "@privy-io/wagmi-connector" -import { usePrivy, useWallets } from '@privy-io/react-auth' -import { usePrivyWagmi } from '@privy-io/wagmi-connector' - -import { Button } from '@/components/ui/button' -import { Dialog, DialogContent, DialogFooter, DialogTrigger } from '@/components/ui/dialog' -import { shorten } from '@/lib/utils/shorten' +import { shorten } from "@/lib/utils/shorten" +import { Button } from "@/components/ui/button" +import { + Dialog, + DialogContent, + DialogFooter, + DialogTrigger, +} from "@/components/ui/dialog" interface WalletConnectPrivyProps extends HTMLAttributes { classNameConnect?: string @@ -21,8 +26,8 @@ export const WalletConnect = ({ className, classNameConnected, classNameWrongNetwork, - labelConnect = 'Connect Wallet', - labelManage = 'Manage Wallets', + labelConnect = "Connect Wallet", + labelManage = "Manage Wallets", ...props }: WalletConnectPrivyProps) => { const { login, ready, authenticated, logout } = usePrivy() @@ -37,22 +42,39 @@ export const WalletConnect = ({ if (!authenticated) { return ( <> - + ) } else { return ( -
-

Manage wallets

+

Manage wallets

+

+ Select your preferred wallet. + + Read more + +

+

- Active: {activeWallet?.address} + Active:{" "} + + {activeWallet?.address} +

{wallets.map((wallet, index) => (
@@ -61,7 +83,10 @@ export const WalletConnect = ({ {wallet.address === activeWallet?.address ? ( Active ) : ( - )} @@ -69,9 +94,7 @@ export const WalletConnect = ({ ))}
- +