aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Thread.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-07-05 12:37:53 +0300
committerGravatar Vitaly Takmazov2023-01-13 10:37:53 +0300
commit8c768c19ce3e3b7bb61344cc8c77a54e10641c6d (patch)
tree5867cfdb5ebddc15843c725962739e8fd8ba52a1 /vnext/src/components/Thread.js
parent1540588b66b491bee651db12a6121622e0f655f7 (diff)
transform-object-rest-spread
Diffstat (limited to 'vnext/src/components/Thread.js')
-rw-r--r--vnext/src/components/Thread.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/vnext/src/components/Thread.js b/vnext/src/components/Thread.js
index 0ec39d11..3de16a64 100644
--- a/vnext/src/components/Thread.js
+++ b/vnext/src/components/Thread.js
@@ -159,12 +159,11 @@ const linkStyle = {
cursor: 'pointer'
}
-function Recommendations(props) {
- const recomms = props.src;
- return recomms && (
- <div className="msg-recomms">{`Recommended by (${recomms.length}): `}
+function Recommendations({src, ...rest}) {
+ return src && (
+ <div className="msg-recomms">{`Recommended by (${src.length}): `}
{
- recomms.map(it => (
+ src.map(it => (
<Link key={it} to={`/${it}/`}>{it}</Link>
)).reduce((prev, curr) => [prev, ', ', curr])
}