Skip to content

Commit

Permalink
Switches to ES6 module imports entirely
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiopro committed Dec 28, 2016
1 parent 4d73f49 commit b0659de
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
var React = require('react');
var arrayShuffle = require('array-shuffle');

import React from 'react';
import arrayShuffle from 'array-shuffle';
import Sorter from './sorter.js';
import swap from './swap.js';

Expand Down
4 changes: 2 additions & 2 deletions src/sortable.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var React = require('react');
var classnames = require('classnames');
import React from 'react';
import classnames from 'classnames';

class Sortable extends React.Component {
render () {
Expand Down
5 changes: 3 additions & 2 deletions src/sorter.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var React = require('react');
var classnames = require('classnames');
import React from 'react';
import classnames from 'classnames';
import selection_sort from './selection_sort.js';
import insertion_sort from './insertion_sort.js';
import bubble_sort from './bubble_sort.js';
Expand Down Expand Up @@ -52,6 +52,7 @@ class Sorter extends React.Component {
<div className={c}>
{this.state.list.map((w, i) => <Sortable
w={w}
key={i}
sorted={this.state.resume && this.state.resume.ranges && into(this.state.resume.ranges, i) || this.state.complete}
selected={this.state.resume && i === this.state.resume.jMin}
current={this.state.resume && i === this.state.resume.i}
Expand Down

0 comments on commit b0659de

Please sign in to comment.