From 96d79f91abe7600117396d38cd047aab4f904853 Mon Sep 17 00:00:00 2001 From: Chris Lawton <chris.lawton@torchbox.com> Date: Wed, 23 Jan 2019 16:44:05 +0000 Subject: [PATCH] adds id to listing headers --- opentech/static_src/src/app/src/components/ListingHeading.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/opentech/static_src/src/app/src/components/ListingHeading.js b/opentech/static_src/src/app/src/components/ListingHeading.js index 996f7a933..ab534aff4 100644 --- a/opentech/static_src/src/app/src/components/ListingHeading.js +++ b/opentech/static_src/src/app/src/components/ListingHeading.js @@ -3,8 +3,9 @@ import PropTypes from 'prop-types'; export default class ListingHeading extends React.Component { render() { + const parsedTitle = this.props.title.split(' ').join('-').toLowerCase(); return ( - <li className="listing__item listing__item--heading"> + <li className="listing__item listing__item--heading" id={parsedTitle}> <h5 className="listing__title">{this.props.title}</h5> <span className="listing__count">{this.props.count}</span> </li> -- GitLab