+
+
+ {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 (
+
+
+
+
+ {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
+