diff options
author | Vitaly Takmazov | 2019-04-08 15:42:37 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2023-01-13 10:37:54 +0300 |
commit | 585c8829b4571ed6c1f593552cd73c1485dc6462 (patch) | |
tree | 94c0862be8989631ea52c9c14ac00c395623c6ba /vnext/src/components | |
parent | fccc23c05712b0b54e77daefd4b74855e52f08b6 (diff) |
Fix React warning
Diffstat (limited to 'vnext/src/components')
-rw-r--r-- | vnext/src/components/UserInfo.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/vnext/src/components/UserInfo.js b/vnext/src/components/UserInfo.js index 0a13f050..90cbb5e0 100644 --- a/vnext/src/components/UserInfo.js +++ b/vnext/src/components/UserInfo.js @@ -62,9 +62,12 @@ export default function UserInfo(props) { } function Summary({ user }) { - let read = user.read && <Link to={`/${user.uname}/friends`}>I read: {user.read.length}</Link>; - let readers = user.readers && <Link to={`/${user.uname}/readers`}>My readers: {user.readers.length}</Link> - let mybl = user.statsMyBL && <Link to={`/${user.uname}/bl`}>My blacklist: {user.statsMyBL}</Link> + const readUrl = `/${user.uname}/friends`; + const readersUrl = `/${user.uname}/readers`; + const blUrl = `/${user.uname}/bl`; + let read = user.read && <Link key={readUrl} to={readUrl}>I read: {user.read.length}</Link>; + let readers = user.readers && <Link key={readersUrl} to={readersUrl}>My readers: {user.readers.length}</Link> + let mybl = user.statsMyBL && <Link key={blUrl} to={blUrl}>My blacklist: {user.statsMyBL}</Link> let presentItems = [read, readers, mybl].filter(Boolean); return ( <div className="msg-summary"> |