From fa379d05dfc413bdb10689e376e1cc7bebfd7a2f Mon Sep 17 00:00:00 2001 From: Jordan Frankfurt Date: Mon, 7 Oct 2024 16:34:20 -0500 Subject: [PATCH] update sign in with farcaster UI (#1046) --- .../FarcasterAccountModal.tsx | 28 +++++++++++++------ .../assets/purple-white-farcaster-icon.svg | 12 ++++++++ .../white-purple-farcaster-icon.svg | 0 3 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 apps/web/src/components/Basenames/UsernameProfileSectionFrames/assets/purple-white-farcaster-icon.svg rename apps/web/src/components/Basenames/UsernameProfileSectionFrames/{ => assets}/white-purple-farcaster-icon.svg (100%) diff --git a/apps/web/src/components/Basenames/UsernameProfileSectionFrames/FarcasterAccountModal.tsx b/apps/web/src/components/Basenames/UsernameProfileSectionFrames/FarcasterAccountModal.tsx index 980330ec14..2b61ca2aec 100644 --- a/apps/web/src/components/Basenames/UsernameProfileSectionFrames/FarcasterAccountModal.tsx +++ b/apps/web/src/components/Basenames/UsernameProfileSectionFrames/FarcasterAccountModal.tsx @@ -9,7 +9,9 @@ import Modal from 'apps/web/src/components/Modal'; import { useFIDQuery } from 'apps/web/src/hooks/useFarcasterUserByFID'; import QRCode from 'qrcode.react'; import { useCallback, useMemo } from 'react'; -import FarcasterIcon from './white-purple-farcaster-icon.svg'; +import WPFarcasterIcon from './assets/white-purple-farcaster-icon.svg'; +import PWFarcasterIcon from './assets/purple-white-farcaster-icon.svg'; +import Image, { StaticImageData } from 'next/image'; export default function FarcasterAccountModal() { const { farcasterSignerState, showFarcasterQRModal, setShowFarcasterQRModal } = useFrameContext(); @@ -19,7 +21,7 @@ export default function FarcasterAccountModal() { [farcasterSignerState.signer], ); const loading = useMemo( - () => !!farcasterSignerState.isLoadingSigner ?? false, + () => !!farcasterSignerState.isLoadingSigner, [farcasterSignerState.isLoadingSigner], ); const handleButtonClick = useCallback(() => { @@ -32,21 +34,31 @@ export default function FarcasterAccountModal() { return ( -
+
{/* Sign-in section when the user is not signed in */} {!farcasterUser && (
-

Sign in with Farcaster

-

Use your Farcaster account to sign in.

-

Be careful! This action costs warps.

+ farcaster icon +

+ Sign in with Warpcast +

+

+ You will need to pay warps to sign in. +