mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
link fe: consistently use "linkIndex"
As opposed to sometimes using just "link", when referring to literal index numbers.
This commit is contained in:
parent
e6fc59f3df
commit
06a33929b4
@ -70,7 +70,7 @@ export class LinkItem extends Component {
|
||||
: "~" + props.ship}</span>
|
||||
<span className="f9 inter gray2 pr3 v-mid">{this.state.timeSinceLinkPost}</span>
|
||||
<Link to=
|
||||
{"/~link" + props.popout + "/" + props.channel + "/" + props.page + "/" + props.index + "/" + encodedUrl}
|
||||
{"/~link" + props.popout + "/" + props.channel + "/" + props.page + "/" + props.linkIndex + "/" + encodedUrl}
|
||||
className="v-top">
|
||||
<span className="f9 inter gray2">
|
||||
{comments}
|
||||
|
@ -199,7 +199,7 @@ export class LinkDetail extends Component {
|
||||
popout={props.popout}
|
||||
url={props.url}
|
||||
linkPage={props.page}
|
||||
linkIndex={props.link}
|
||||
linkIndex={props.linkIndex}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -45,14 +45,14 @@ export class Links extends Component {
|
||||
: 1;
|
||||
|
||||
let LinkList = Object.keys(links)
|
||||
.map((link) => {
|
||||
.map((linkIndex) => {
|
||||
let linksObj = props.links[linkPage];
|
||||
let { title, url, time, ship } = linksObj[link];
|
||||
let { title, url, time, ship } = linksObj[linkIndex];
|
||||
let members = {};
|
||||
|
||||
const commentCount = props.comments[url]
|
||||
? props.comments[url].totalItems
|
||||
: linksObj[link].commentCount || 0;
|
||||
: linksObj[linkIndex].commentCount || 0;
|
||||
|
||||
if (!props.members[ship]) {
|
||||
members[ship] = {'nickname': '', 'avatar': 'TODO', 'color': '0x0'};
|
||||
@ -77,7 +77,7 @@ export class Links extends Component {
|
||||
key={time}
|
||||
title={title}
|
||||
page={props.page}
|
||||
index={link}
|
||||
linkIndex={linkIndex}
|
||||
url={url}
|
||||
timestamp={time}
|
||||
nickname={nickname}
|
||||
|
@ -137,7 +137,7 @@ export class Root extends Component {
|
||||
{...props}
|
||||
page={page}
|
||||
url={url}
|
||||
link={index}
|
||||
linkIndex={index}
|
||||
members={groupMembers}
|
||||
path={groupPath}
|
||||
popout={popout}
|
||||
|
Loading…
Reference in New Issue
Block a user