From 12a64e45074323162c989077a60a81f944b23d6f Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 10 Dec 2022 19:15:30 +0800 Subject: [PATCH] No need check relationship with self. "Am I following myself??" --- src/components/account.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/account.jsx b/src/components/account.jsx index 265db0e4..9230e394 100644 --- a/src/components/account.jsx +++ b/src/components/account.jsx @@ -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 {