Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
feat(ContributorPage): add anonymous name option
Browse files Browse the repository at this point in the history
  • Loading branch information
CanRau committed Dec 24, 2018
1 parent 727a6a9 commit 9bf2d84
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/templates/ContributorsPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,11 +189,11 @@ class ContributorsPage extends React.Component {
{contributors.edges.map((x, index) => (
<Contributor key={x.node.key + index} id={x.node.key}>
<ContributorLink
href={`#${x.node.key}`}
highlighted={this.state.highlighted === x.node.key}
href={`#${x.node.anonymous ? `anon` : x.node.key}`}
highlighted={this.state.highlighted === x.node.anonymous ? `anon` : x.node.key}
onClick={this.handleClick(x.node.key)}
>
{page.frontmatter.thanksLabel} <strong>{x.node.name}</strong>
{page.frontmatter.thanksLabel} <strong>{x.node.anonymous ? `Anonymous` : x.node.name}</strong>
{` `}
{page.frontmatter.forLabel} {x.node.amount}
{page.frontmatter.squareMeterLabel}
Expand Down Expand Up @@ -254,6 +254,7 @@ export const query = graphql`
name
date
amount
anonymous
}
}
}
Expand Down

0 comments on commit 9bf2d84

Please sign in to comment.