Experimental port to Firebase hosting

This commit is contained in:
Michael Jackson
2019-01-05 16:50:05 -08:00
parent e4d6df255e
commit 31e7d3865a
300 changed files with 129300 additions and 5817 deletions

View File

@ -1,22 +1,22 @@
const React = require('react');
const PropTypes = require('prop-types');
import React from 'react';
import PropTypes from 'prop-types';
const addEvent = require('../utils/addEvent');
const removeEvent = require('../utils/removeEvent');
import { addEvent, removeEvent } from '../utils/dom';
const resizeEvent = 'resize';
class WindowSize extends React.Component {
export default class WindowSize extends React.Component {
static propTypes = {
onChange: PropTypes.func
};
handleWindowResize = () => {
if (this.props.onChange)
if (this.props.onChange) {
this.props.onChange({
width: window.innerWidth,
height: window.innerHeight
});
}
};
componentDidMount() {
@ -31,5 +31,3 @@ class WindowSize extends React.Component {
return null;
}
}
module.exports = WindowSize;