{user?.bio || user?.about}
View full profile diff --git a/src/app/chat/hooks/useDecryptMessage.tsx b/src/app/chats/hooks/useDecryptMessage.tsx similarity index 100% rename from src/app/chat/hooks/useDecryptMessage.tsx rename to src/app/chats/hooks/useDecryptMessage.tsx diff --git a/src/app/chat/index.tsx b/src/app/chats/index.tsx similarity index 95% rename from src/app/chat/index.tsx rename to src/app/chats/index.tsx index 7036bc37..9cfa8436 100644 --- a/src/app/chat/index.tsx +++ b/src/app/chats/index.tsx @@ -4,9 +4,9 @@ import { useCallback, useEffect, useRef } from 'react'; import { useParams } from 'react-router-dom'; import { Virtuoso } from 'react-virtuoso'; -import { ChatMessageForm } from '@app/chat/components/messages/form'; -import { ChatMessageItem } from '@app/chat/components/messages/item'; -import { ChatSidebar } from '@app/chat/components/sidebar'; +import { ChatMessageForm } from '@app/chats/components/messages/form'; +import { ChatMessageItem } from '@app/chats/components/messages/item'; +import { ChatSidebar } from '@app/chats/components/sidebar'; import { useNDK } from '@libs/ndk/provider'; import { createChat, getChatMessages } from '@libs/storage'; diff --git a/src/app/user/index.tsx b/src/app/user/index.tsx deleted file mode 100644 index 860a668e..00000000 --- a/src/app/user/index.tsx +++ /dev/null @@ -1,147 +0,0 @@ -import { useEffect, useState } from 'react'; -import { Link, useParams } from 'react-router-dom'; - -import { UserFeed } from '@app/user/components/feed'; -import { UserMetadata } from '@app/user/components/metadata'; - -import { EditProfileModal } from '@shared/editProfileModal'; -import { ZapIcon } from '@shared/icons'; -import { Image } from '@shared/image'; - -import { DEFAULT_AVATAR } from '@stores/constants'; - -import { useAccount } from '@utils/hooks/useAccount'; -import { useProfile } from '@utils/hooks/useProfile'; -import { useSocial } from '@utils/hooks/useSocial'; -import { shortenKey } from '@utils/shortenKey'; - -export function UserScreen() { - const { pubkey } = useParams(); - const { user } = useProfile(pubkey); - const { account } = useAccount(); - const { status, userFollows, follow, unfollow } = useSocial(); - - const [followed, setFollowed] = useState(false); - - const followUser = (pubkey: string) => { - try { - follow(pubkey); - - // update state - setFollowed(true); - } catch (error) { - console.log(error); - } - }; - - const unfollowUser = (pubkey: string) => { - try { - unfollow(pubkey); - - // update state - setFollowed(false); - } catch (error) { - console.log(error); - } - }; - - useEffect(() => { - if (status === 'success' && userFollows) { - if (userFollows.includes(pubkey)) { - setFollowed(true); - } - } - }, [status]); - - return ( -- {user?.about} -
-Latest posts
- 48 hours ago -+ {user?.about || user?.bio} +
+Latest posts
+ 48 hours ago ++ No new posts about this hashtag in 48 hours ago +
+