-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Minor fixes and README written Deploy Fix vulnerabilities Cleanup
- Loading branch information
Showing
7 changed files
with
4,603 additions
and
2,992 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
import React from 'react' | ||
|
||
export default class Crime extends React.Component { | ||
cleanDashCase(dashCase) { | ||
const s = dashCase.split('-').join(' ') | ||
return s[0].toUpperCase() + s.slice(1) | ||
} | ||
cleanDashCase(dashCase) { | ||
const s = dashCase.split('-').join(' ') | ||
return s[0].toUpperCase() + s.slice(1) | ||
} | ||
|
||
render() { | ||
const { crime } = this.props | ||
return ( | ||
<article className="media"> | ||
<div className="media-content"> | ||
<div className="content"> | ||
<p><strong>{this.cleanDashCase(crime.category)}</strong></p> | ||
<p>{crime.location.street.name} <br /> | ||
{crime.outcome_status == null ? "🔎 No outcome avaliable" : "🧐" + crime.outcome_status.category} | ||
</p> | ||
</div> | ||
</div> | ||
</article> | ||
) | ||
} | ||
render() { | ||
const { crime } = this.props | ||
return ( | ||
<article className="media"> | ||
<div className="media-content"> | ||
<div className="content"> | ||
<p><strong>{this.cleanDashCase(crime.category)}</strong></p> | ||
<p>{crime.location.street.name} <br /> | ||
{crime.outcome_status == null ? "🔎 No outcome avaliable" : "🧐" + crime.outcome_status.category} | ||
</p> | ||
</div> | ||
</div> | ||
</article> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
import React, {Fragment} from 'react' | ||
import React, { Fragment } from 'react' | ||
|
||
export default class Level extends React.Component { | ||
render() { | ||
const { crimes, postcode } = this.props | ||
return ( | ||
<nav className="level"> | ||
<p className="level-item has-text-centered"> | ||
{(() => { | ||
if (crimes.length == 0 && postcode == '') { | ||
return 'Please enter your postcode' | ||
} else if (crimes.length == 0) { | ||
return (<>No records found for <strong>{postcode.toUpperCase()}</strong></>) | ||
} | ||
return (<><strong>{crimes.length}</strong> records found for <strong>{postcode.toUpperCase()}</strong></>) | ||
})()} | ||
</p> | ||
</nav> | ||
) | ||
} | ||
render() { | ||
const { crimes | ||
, postcode } = this.props | ||
return ( | ||
<nav className="level"> | ||
<p className="level-item has-text-centered"> | ||
{(() => { | ||
if (crimes.length == 0 && postcode == '') { | ||
return 'Please enter your postcode' | ||
} else if (crimes.length == 0) { | ||
return (<span>No records found for <strong>{postcode.toUpperCase()}</strong></span>) | ||
} | ||
return (<span><strong>{crimes.length}</strong> records found for <strong>{postcode.toUpperCase()}</strong></span>) | ||
})()} | ||
</p> | ||
</nav> | ||
) | ||
} | ||
} |
Oops, something went wrong.
d215e7e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to following URLs: