import * as React from "react";
import { Week } from "./interfaces";
import { toggleDay } from "./actions";
interface WeekRowProps {
week: Week;
index: number;
dispatch: Function;
}
let DAYS = [ 1, 2, 3, 4, 5, 6, 7 ];
export function WeekRow({index, dispatch, week}: WeekRowProps) {
return
{
DAYS.map(function(day) {
let id = `${index}-${day}`;
let lookup = `day${day}`;
return ;
})
}
;
}
interface DayProps {
day: number;
week: number;
dispatch: Function;
id: string;
active: boolean;
}
let select = (dispatch: Function, day: number, week: number) => () =>
dispatch(toggleDay({day, week}));
function Day({day, id, dispatch, week, active}: DayProps) {
return
;
}