import { Text } from "preact-i18n"; import styles from "./Panes.module.scss"; import Checkbox from "../../../components/ui/Checkbox"; import { connectState } from "../../../redux/connector"; import { WithDispatcher } from "../../../redux/reducers"; import { AVAILABLE_EXPERIMENTS, ExperimentOptions } from "../../../redux/reducers/experiments"; interface Props { options?: ExperimentOptions; } export function Component(props: Props & WithDispatcher) { return (

{ (AVAILABLE_EXPERIMENTS).map( key => -1} onChange={enabled => { props.dispatcher({ type: enabled ? 'EXPERIMENTS_ENABLE' : 'EXPERIMENTS_DISABLE', key }); }} >

) } { AVAILABLE_EXPERIMENTS.length === 0 &&
}
); } export const ExperimentsPage = connectState( Component, state => { return { options: state.experiments }; }, true );