diff --git a/src/components/Schedule.js b/src/components/Schedule.js index 7eba68a2..fc47aa4a 100644 --- a/src/components/Schedule.js +++ b/src/components/Schedule.js @@ -1,7 +1,7 @@ import React from 'react' -const {getDates} = require('../utils/date') -const {shortName} = require('../models/collective') +const { getDates } = require('../utils/date') +const { shortName } = require('../models/collective') const now = new Date() const dates = getDates(now) @@ -11,111 +11,111 @@ const weekDay = weekDayIndex => dates[weekDayIndex] const short = shortName const todayClass = i => isToday(i) - ? 'current' - : '' + ? 'current' + : '' -const HeadDay = ({i, children}) => ( -
{children}
-{weekDay(i)}
-{children}
+{weekDay(i)}
+{name}
-{time}
-{name}
+{time}
+- {url - ? ( - - {title} - - ) - : ( - - {title} - - ) - } -
+const Lesson = ({ title, url }) => ( ++ {url + ? ( + + {title} + + ) + : ( + + {title} + + ) + } +
) -const Teacher = ({name, url}) => ( -- {url - ? ( - - {short(name)} - - ) - : ( - - {short(name)} - - ) - } -
+const Teacher = ({ name, url }) => ( ++ {url + ? ( + + {short(name)} + + ) + : ( + + {short(name)} + + ) + } +
) -const TimeRange = ({range}) => ( -{(range || []).join(' — ')}
+const TimeRange = ({ range }) => ( +{(range || []).join(' — ')}
)