| Conditions | 4 |
| Total Lines | 49 |
| Code Lines | 39 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | import React, { Component } from 'react' |
||
| 20 | |||
| 21 | render() { |
||
| 22 | if (this.props.regNumber === '00055') { |
||
| 23 | if (this.props.lazyload === true) { |
||
| 24 | return ( |
||
| 25 | <LazyLoad debounce={false}> |
||
| 26 | <img |
||
| 27 | src={LogoFlat} |
||
| 28 | alt="KCVV Elewijt" |
||
| 29 | className={this.props.className} |
||
| 30 | /> |
||
| 31 | </LazyLoad> |
||
| 32 | ) |
||
| 33 | } else { |
||
| 34 | return ( |
||
| 35 | <img |
||
| 36 | src={LogoFlat} |
||
| 37 | alt="KCVV Elewijt" |
||
| 38 | className={this.props.className} |
||
| 39 | /> |
||
| 40 | ) |
||
| 41 | } |
||
| 42 | } |
||
| 43 | const logoUrl = `${this.apiLogoUrl}/${this.props.regNumber}` |
||
| 44 | |||
| 45 | if (this.props.lazyload === true) { |
||
| 46 | return ( |
||
| 47 | <LazyLoad debounce={false}> |
||
| 48 | <img |
||
| 49 | src={logoUrl} |
||
| 50 | onError={({ target }) => { |
||
| 51 | target.onerror = null |
||
| 52 | target.src = defaultLogo |
||
| 53 | }} |
||
| 54 | alt={this.props.title} |
||
| 55 | className={this.props.className} |
||
| 56 | /> |
||
| 57 | </LazyLoad> |
||
| 58 | ) |
||
| 59 | } else { |
||
| 60 | return ( |
||
| 61 | <img |
||
| 62 | src={logoUrl} |
||
| 63 | onError={({ target }) => { |
||
| 64 | target.onerror = null |
||
| 65 | target.src = defaultLogo |
||
| 66 | }} |
||
| 67 | alt={this.props.title} |
||
| 68 | className={this.props.className} |
||
| 69 | /> |
||
| 107 |