Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import React from 'react';
import PropTypes from 'prop-types';
import moment from 'moment';
import { momentString } from 'react-moment-proptypes';
import AutoSizer from 'react-virtualized/dist/commonjs/AutoSizer';
import { range } from './utils/dates';
import Calendar from './Calendar';
import Day from './Day';
export default class Schedule extends React.PureComponent {
static propTypes = {
startDate: momentString.isRequired,
durations: PropTypes.number,
};
static defaultProps = {
durations: 90,
};
constructor(props) {
super(props);
const {
startDate,
durations,
} = this.props;
this.state = {
import { render } from 'react-dom'
import PropTypes from 'prop-types'
import { momentString } from 'react-moment-proptypes'
import AutoSizer from 'react-virtualized-auto-sizer'
import {
FixedSizeGrid as Grid,
FixedSizeList as ListA
} from 'react-window'
import DatePicker from './src/DatePicker'
import { Button, Dropdown } from '@wordpress/components'
const moment = extendMoment(Moment)
class Scheduler extends React.Component {
static propTypes = {
startDate: momentString.isRequired,
durations: PropTypes.number,
}
static defaultProps = {
durations: 90
}
constructor(props) {
super(props)
const {
startDate,
durations
} = this.props
const rooms = window.awebookingRoomTypes[0].rooms