mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 10:15:37 +03:00
No need check relationship with self.
"Am I following myself??"
This commit is contained in:
parent
33c88d648a
commit
12a64e4507
1 changed files with 6 additions and 0 deletions
|
@ -3,6 +3,7 @@ import './account.css';
|
||||||
import { useEffect, useState } from 'preact/hooks';
|
import { useEffect, useState } from 'preact/hooks';
|
||||||
|
|
||||||
import shortenNumber from '../utils/shorten-number';
|
import shortenNumber from '../utils/shorten-number';
|
||||||
|
import store from '../utils/store';
|
||||||
|
|
||||||
import Avatar from './avatar';
|
import Avatar from './avatar';
|
||||||
import NameText from './name-text';
|
import NameText from './name-text';
|
||||||
|
@ -58,6 +59,11 @@ export default ({ account }) => {
|
||||||
const [relationship, setRelationship] = useState(null);
|
const [relationship, setRelationship] = useState(null);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (info) {
|
if (info) {
|
||||||
|
const currentAccount = store.session.get('currentAccount');
|
||||||
|
if (currentAccount === id) {
|
||||||
|
// It's myself!
|
||||||
|
return;
|
||||||
|
}
|
||||||
setRelationshipUIState('loading');
|
setRelationshipUIState('loading');
|
||||||
(async () => {
|
(async () => {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue