refactor active account and clean up

This commit is contained in:
Ren Amamiya
2023-03-31 16:06:40 +07:00
parent c7e2b9430a
commit 5b88b335a1
15 changed files with 101 additions and 490 deletions

View File

@@ -16,7 +16,7 @@ export default function NoteConnector() {
const [pool, relays]: any = useContext(RelayContext);
const setHasNewerNote = useSetAtom(hasNewerNoteAtom);
const activeAccount = useAtomValue(activeAccountAtom);
const activeAccount: any = useAtomValue(activeAccountAtom);
const [isOnline] = useState(true);
const now = useRef(new Date());

View File

@@ -33,7 +33,7 @@ export const NoteComment = memo(function NoteComment({
const router = useRouter();
const [pool, relays]: any = useContext(RelayContext);
const activeAccount = useAtomValue(activeAccountAtom);
const activeAccount: any = useAtomValue(activeAccountAtom);
const [open, setOpen] = useState(false);
const [value, setValue] = useState('');

View File

@@ -22,7 +22,7 @@ export const NoteReaction = memo(function NoteReaction({
}) {
const [pool, relays]: any = useContext(RelayContext);
const activeAccount = useAtomValue(activeAccountAtom);
const activeAccount: any = useAtomValue(activeAccountAtom);
const [isReact, setIsReact] = useState(false);
const [like, setLike] = useState(0);