import React from 'react' import { withRouter } from "react-router-dom"; import { navigateToQuery } from './query' export const COMPARISON_DISABLED_PERIODS = ['realtime', 'all'] const ComparisonInput = function({ site, query, history }) { if (!site.flags.comparisons) return null if (COMPARISON_DISABLED_PERIODS.includes(query.period)) return null function update(event) { navigateToQuery(history, query, { comparison: event.target.checked }) } return (