import React from 'react'; import Map from '../components/Map'; import { IonHeader, IonToolbar, IonButtons, IonMenuButton, IonTitle, IonContent, IonPage, } from '@ionic/react'; import { Location } from '../models/Location'; import { connect } from '../data/connect'; import * as selectors from '../data/selectors'; import './MapView.scss'; interface OwnProps {} interface StateProps { locations: Location[]; mapCenter: Location; } interface DispatchProps {} interface MapViewProps extends OwnProps, StateProps, DispatchProps {} const MapView: React.FC = ({ locations, mapCenter }) => { return ( Map ); }; export default connect({ mapStateToProps: (state) => ({ locations: state.data.locations, mapCenter: selectors.mapCenter(state), }), component: MapView, });