clean up and fix errors

This commit is contained in:
Ren Amamiya
2023-04-19 08:50:32 +07:00
parent c72798507e
commit 697caca77b
13 changed files with 83 additions and 78 deletions

View File

@@ -12,7 +12,7 @@ import {
getActiveAccount,
getPlebs,
} from '@utils/storage';
import { getParentID, nip02ToArray } from '@utils/transform';
import { getParentID } from '@utils/transform';
import LumeSymbol from '@assets/icons/Lume';
@@ -31,10 +31,11 @@ export default function Page() {
const unsubscribe = useRef(null);
const fetchData = useCallback(
async (account: { id: number; pubkey: string; chats: string[] }, follows: any) => {
async (account: { id: number; pubkey: string; chats: string[] }, tags: any) => {
const notes = await countTotalNotes();
const channels = await countTotalChannels();
const chats = account.chats?.length || 0;
const follows = JSON.parse(tags);
const query = [];
let since: number;
@@ -47,7 +48,7 @@ export default function Page() {
}
query.push({
kinds: [1, 6],
authors: JSON.parse(follows),
authors: follows,
since: since,
until: dateToUnix(now.current),
});