diff --git a/src/components/channels/createChannelModal.tsx b/src/components/channels/createChannelModal.tsx
index 41314ab1..ab09699c 100644
--- a/src/components/channels/createChannelModal.tsx
+++ b/src/components/channels/createChannelModal.tsx
@@ -13,7 +13,7 @@ export const CreateChannelModal = () => {
const [pool, relays]: any = useContext(RelayContext);
const [open, setOpen] = useState(false);
- const [activeAccount]: any = useLocalStorage('activeAccount');
+ const [activeAccount]: any = useLocalStorage('activeAccount', {});
const {
register,
diff --git a/src/components/chats/chatList.tsx b/src/components/chats/chatList.tsx
index 7857d09d..a64e9427 100644
--- a/src/components/chats/chatList.tsx
+++ b/src/components/chats/chatList.tsx
@@ -12,8 +12,8 @@ export default function ChatList() {
const router = useRouter();
const [list, setList] = useState([]);
- const [activeAccount]: any = useLocalStorage('activeAccount');
- const accountProfile = JSON.parse(activeAccount.metadata);
+ const [activeAccount]: any = useLocalStorage('activeAccount', {});
+ const profile = activeAccount.metadata ? JSON.parse(activeAccount.metadata) : null;
const openSelfChat = () => {
router.push({
@@ -41,7 +41,7 @@ export default function ChatList() {
>
-
-
-
-
- {/* main */}
-
- {/* menu */}
-
-
-
Menu
-
-
-
- Personal Page
-
-
- Update Profile
-
-
-
-
-
-
-
-
-
- );
-}
diff --git a/src/pages/chats/[pubkey].tsx b/src/pages/chats/[pubkey].tsx
index 05ab0c76..5bf8c048 100644
--- a/src/pages/chats/[pubkey].tsx
+++ b/src/pages/chats/[pubkey].tsx
@@ -23,7 +23,7 @@ export default function Page() {
const router = useRouter();
const pubkey: any = router.query.pubkey || null;
- const [activeAccount]: any = useLocalStorage('activeAccount');
+ const [activeAccount]: any = useLocalStorage('activeAccount', {});
const [messages, setMessages] = useState([]);
useEffect(() => {
diff --git a/src/pages/init.tsx b/src/pages/init.tsx
index 4c5d505e..3710f497 100644
--- a/src/pages/init.tsx
+++ b/src/pages/init.tsx
@@ -31,9 +31,9 @@ export default function Page() {
const [eose, setEose] = useState(false);
- const [lastLogin] = useLocalStorage('lastLogin');
- const [activeAccount]: any = useLocalStorage('activeAccount');
- const [follows] = useLocalStorage('activeAccountFollows');
+ const [lastLogin] = useLocalStorage('lastLogin', '');
+ const [activeAccount]: any = useLocalStorage('activeAccount', {});
+ const [follows] = useLocalStorage('activeAccountFollows', []);
const fetchData = useCallback(
async (since: Date) => {
diff --git a/src/pages/newsfeed/[id].tsx b/src/pages/newsfeed/[id].tsx
index 33104674..d1831540 100644
--- a/src/pages/newsfeed/[id].tsx
+++ b/src/pages/newsfeed/[id].tsx
@@ -1,53 +1,10 @@
import BaseLayout from '@layouts/base';
import WithSidebarLayout from '@layouts/withSidebar';
-import FormComment from '@components/form/comment';
-import { NoteComment } from '@components/note/comment';
-import { NoteExtend } from '@components/note/extend';
-import { RelayContext } from '@components/relaysProvider';
-
-import { useRouter } from 'next/router';
-import {
- JSXElementConstructor,
- ReactElement,
- ReactFragment,
- ReactPortal,
- useContext,
- useEffect,
- useState,
-} from 'react';
+import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal } from 'react';
export default function Page() {
- const [pool, relays]: any = useContext(RelayContext);
-
- const router = useRouter();
- const id = router.query.id || null;
-
- const [rootEvent, setRootEvent] = useState(null);
- const [comments, setComments] = useState([]);
-
- useEffect(() => {
- /*getNoteByID(id)
- .then((res) => {
- setRootEvent(res);
- getAllCommentNotes(id).then((res: any) => setComments(res));
- })
- .catch(console.error);*/
- }, [id, pool, relays]);
-
- return (
-
-
- {rootEvent && }
-
-
-
-
-
- {comments.length > 0 && comments.map((comment) => )}
-
-
- );
+ return
;
}
Page.getLayout = function getLayout(