No need check relationship with self.

"Am I following myself??"
pull/1/head
Lim Chee Aun 2022-12-10 19:15:30 +08:00
rodzic 33c88d648a
commit 12a64e4507
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -3,6 +3,7 @@ import './account.css';
import { useEffect, useState } from 'preact/hooks';
import shortenNumber from '../utils/shorten-number';
import store from '../utils/store';
import Avatar from './avatar';
import NameText from './name-text';
@ -58,6 +59,11 @@ export default ({ account }) => {
const [relationship, setRelationship] = useState(null);
useEffect(() => {
if (info) {
const currentAccount = store.session.get('currentAccount');
if (currentAccount === id) {
// It's myself!
return;
}
setRelationshipUIState('loading');
(async () => {
try {