diff --git a/src/app/auth/components/user.tsx b/src/app/auth/components/user.tsx index 4b2b7c97..c4b26e9c 100644 --- a/src/app/auth/components/user.tsx +++ b/src/app/auth/components/user.tsx @@ -1,3 +1,6 @@ +import { Link } from 'react-router-dom'; + +import { WorldIcon } from '@shared/icons'; import { Image } from '@shared/image'; import { useProfile } from '@utils/hooks/useProfile'; @@ -8,7 +11,7 @@ export function User({ pubkey, fallback }: { pubkey: string; fallback?: string } if (status === 'loading') { return (
-
+
@@ -24,10 +27,21 @@ export function User({ pubkey, fallback }: { pubkey: string; fallback?: string } alt={pubkey} className="h-11 w-11 shrink-0 rounded-lg object-cover" /> -
-

- {user?.name || user?.display_name} -

+
+
+

+ {user?.name || user?.display_name} +

+ {user?.website ? ( + + {' '} + + ) : null} +
{user?.about || user?.bio || 'No bio'}
diff --git a/src/app/auth/components/userImport.tsx b/src/app/auth/components/userImport.tsx new file mode 100644 index 00000000..8801f8fe --- /dev/null +++ b/src/app/auth/components/userImport.tsx @@ -0,0 +1,38 @@ +import { Image } from '@shared/image'; + +import { useProfile } from '@utils/hooks/useProfile'; +import { displayNpub } from '@utils/shortenKey'; + +export function UserImport({ pubkey }: { pubkey: string }) { + const { status, user } = useProfile(pubkey); + + if (status === 'loading') { + return ( +
+
+
+ + +
+
+ ); + } + + return ( +
+ {pubkey} +
+

+ {user?.name || user?.display_name} +

+

+ {user?.nip05 || user?.username || displayNpub(pubkey, 16)} +

+
+
+ ); +} diff --git a/src/app/auth/import/step-1.tsx b/src/app/auth/import/step-1.tsx index 6074d8d1..e7ac3047 100644 --- a/src/app/auth/import/step-1.tsx +++ b/src/app/auth/import/step-1.tsx @@ -66,10 +66,11 @@ export function ImportStep1Screen() { // add account to local database db.createAccount(npub, pubkey); - // redirect to step 2 - navigate('/auth/import/step-2', { replace: true }); + // redirect to step 2 with delay 1.2s + setTimeout(() => navigate('/auth/import/step-2', { replace: true }), 1200); } } catch (error) { + setLoading(false); setError('privkey', { type: 'custom', message: 'Private key is invalid, please check again', @@ -84,20 +85,24 @@ export function ImportStep1Screen() { return (
-
-

Import your key

+
+

+ Import your Nostr key +

- Private key + - + {errors.privkey &&

{errors.privkey.message}

}
@@ -105,12 +110,12 @@ export function ImportStep1Screen() {
-

- Password is use to unlock app and secure your key store in local machine. - When you move to other clients, you just need to copy your private key as - nsec or hexstring -

{errors.password &&

{errors.password.message}

}
@@ -125,12 +126,12 @@ export function ImportStep2Screen() { + + By clicking 'Continue', Lume will download your relay list and all + events from the last 24 hours. It may take a bit +