feat: train, news and weather
This commit is contained in:
24
src/containers/TrainSchedule.tsx
Normal file
24
src/containers/TrainSchedule.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import styled from 'styled-components';
|
||||
|
||||
import { type Dispatch } from 'react';
|
||||
import {
|
||||
type State,
|
||||
type Action
|
||||
} from '../state';
|
||||
|
||||
import { Departure } from '../components';
|
||||
import { NowTime } from '../components/NowTime';
|
||||
|
||||
type TrainScheduleProps = {
|
||||
dispatch: Dispatch<Action>,
|
||||
state: State,
|
||||
}
|
||||
|
||||
|
||||
export const TrainSchedule = ({ state } : TrainScheduleProps) => {
|
||||
|
||||
return <>
|
||||
{state.liveboard?.departures.departure.map(departure => <Departure {...{departure}} />)}
|
||||
<NowTime />
|
||||
</>
|
||||
}
|
||||
Reference in New Issue
Block a user