Skip to content

Commit

Permalink
Merge pull request #69 from Medium/valueof/update
Browse files Browse the repository at this point in the history
Update Next and React to the latest versions
  • Loading branch information
Anton authored Oct 4, 2019
2 parents 842802a 9e19b29 commit da47604
Show file tree
Hide file tree
Showing 7 changed files with 3,762 additions and 2,979 deletions.
7 changes: 7 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 1,7 @@
{
"presets": [
"next/babel",
"@babel/preset-flow"
],
"plugins": []
}
2 changes: 1 addition & 1 deletion components/LevelThermometer.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 61,7 @@ class LevelThermometer extends React.Component<Props> {
.style('text-anchor', 'start')
}

rightRoundedRect(x, y, width, height, radius) {
rightRoundedRect(x: *, y: *, width: *, height: *, radius: *) {
return "M" x "," y
"h" (width - radius)
"a" radius "," radius " 0 0 1 " radius "," radius
Expand Down
2 changes: 1 addition & 1 deletion components/SnowflakeApp.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 239,7 @@ class SnowflakeApp extends React.Component<Props, SnowflakeAppState> {
let milestone = prevMilestone delta
if (milestone < 0) milestone = 0
if (milestone > 5) milestone = 5
this.handleTrackMilestoneChange(this.state.focusedTrackId, milestone)
this.handleTrackMilestoneChange(this.state.focusedTrackId, ((milestone: any): Milestone))
}

setTitle(title: string) {
Expand Down
4 changes: 2 additions & 2 deletions components/TitleSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 6,11 @@ import type { MilestoneMap } from '../constants'

type Props = {
milestoneByTrack: MilestoneMap,
currentTitle: String,
currentTitle: string,
setTitleFn: (string) => void
}

class TitleSelector extends React.Component {
class TitleSelector extends React.Component<Props> {
render() {
const titles = eligibleTitles(this.props.milestoneByTrack)
return <select value={this.props.currentTitle} onChange={e => this.props.setTitleFn(e.target.value)}>
Expand Down
2 changes: 2 additions & 0 deletions components/Wordmark.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 6,17 @@
"license": "MIT",
"dependencies": {
"d3": "^4.11.0",
"next": "^4.0.0-beta.4",
"react": "^16.0.0",
"react-dom": "^16.0.0"
"next": "^9.0.7",
"react": "^16.10.2",
"react-dom": "^16.10.2"
},
"scripts": {
"dev": "next",
"export": "next build && next export",
"flow": "flow"
},
"devDependencies": {
"@babel/preset-flow": "^7.0.0",
"flow-bin": "^0.57.2"
}
}
Loading

0 comments on commit da47604

Please sign in to comment.