From 53aa13c8aa090159daf03a98aca2372054d09c2d Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Mon, 18 Sep 2023 09:50:15 +0700 Subject: [PATCH] clean up messy code --- src/app/auth/complete.tsx | 3 +- src/app/auth/components/user.tsx | 54 ----- src/app/auth/components/userImport.tsx | 38 ---- src/app/auth/components/userRelay.tsx | 36 ---- src/app/auth/import/step-3.tsx | 5 +- src/app/auth/onboarding/step-1.tsx | 9 +- src/app/auth/onboarding/step-3.tsx | 5 +- src/app/auth/reset.tsx | 14 +- src/app/auth/unlock.tsx | 5 +- src/app/chats/components/messages/item.tsx | 2 +- src/app/chats/components/modal.tsx | 11 +- src/app/chats/components/unknowns.tsx | 5 +- src/app/notes/article.tsx | 32 +-- src/app/notes/text.tsx | 4 +- .../notifications/components/simpleNote.tsx | 2 +- src/app/nwc/index.tsx | 18 +- src/index.css | 2 +- src/shared/nip05.tsx | 5 +- src/shared/notes/actions/more.tsx | 2 +- src/shared/notes/index.ts | 3 - src/shared/notes/kinds/repost.tsx | 79 ++++--- src/shared/notes/mentions/note.tsx | 2 +- src/shared/notes/metadata.tsx | 4 +- src/shared/notes/replies/list.tsx | 4 +- src/shared/notes/users/mini.tsx | 19 -- src/shared/notes/users/repost.tsx | 28 --- src/shared/notes/users/thread.tsx | 34 ---- src/shared/user.tsx | 192 +++++++++++++----- src/shared/widgets/local/thread.tsx | 4 +- src/shared/widgets/tmp/feeds.tsx | 5 +- src/utils/hooks/useEvent.ts | 3 +- 31 files changed, 256 insertions(+), 373 deletions(-) delete mode 100644 src/app/auth/components/user.tsx delete mode 100644 src/app/auth/components/userImport.tsx delete mode 100644 src/app/auth/components/userRelay.tsx delete mode 100644 src/shared/notes/users/mini.tsx delete mode 100644 src/shared/notes/users/repost.tsx delete mode 100644 src/shared/notes/users/thread.tsx diff --git a/src/app/auth/complete.tsx b/src/app/auth/complete.tsx index 5a3a3291..740697df 100644 --- a/src/app/auth/complete.tsx +++ b/src/app/auth/complete.tsx @@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom'; export function CompleteScreen() { const navigate = useNavigate(); - const [count, setCount] = useState(3); + const [count, setCount] = useState(5); useEffect(() => { let counter: NodeJS.Timeout; @@ -26,7 +26,6 @@ export function CompleteScreen() {
Thank you for using Lume. Lume doesn't use telemetry. If you encounter any diff --git a/src/app/auth/components/user.tsx b/src/app/auth/components/user.tsx deleted file mode 100644 index bfded070..00000000 --- a/src/app/auth/components/user.tsx +++ /dev/null @@ -1,54 +0,0 @@ -import { Link } from 'react-router-dom'; - -import { WorldIcon } from '@shared/icons'; -import { Image } from '@shared/image'; - -import { useProfile } from '@utils/hooks/useProfile'; - -export function User({ pubkey, fallback }: { pubkey: string; fallback?: string }) { - const { status, user } = useProfile(pubkey, fallback); - - if (status === 'loading') { - return ( -
- {user?.name || user?.display_name} -
-- {user?.about || user?.bio || 'No bio'} -
-{user.website}
- - ) : null} -- {user?.nip05 || user?.username || displayNpub(pubkey, 16)} -
-