Skip to content

Commit

Permalink
templates/Circle: Refactor booth highlight
Browse files Browse the repository at this point in the history
  • Loading branch information
blazeu committed Mar 2, 2018
1 parent 5d8b2dc commit c79c28e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/templates/Circle/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,8 @@ export default class CirclePage extends Component {
highlightBooth() {
const { data: { catalogYaml: { booth_number } } } = this.props
let booth = booth_number.replace('-', '')

if (booth.startsWith('CB')) {
booth = booth.replace('CB', 'Cb')
}

if (booth.endsWith(')')) {
booth = booth.replace(/ \(.+\)/, '')
}
booth = booth.replace(/ \(.+\)/g, '')
booth = booth.replace(/CB/g, 'Cb')

if (booth.endsWith('ab')) {
const number = booth.replace('ab', '')
Expand Down

0 comments on commit c79c28e

Please sign in to comment.