// REQ0042/event-detail // // PURPOSE: // - show avatar in a row // // RULES: // - T.B.A. // import React, { useEffect, useState } from 'react'; import { IonHeader, IonToolbar, IonContent, IonPage, IonButtons, IonMenuButton, IonButton, IonIcon, IonDatetime, IonSelectOption, IonList, IonItem, IonLabel, IonSelect, IonPopover, IonText, IonFooter, useIonRouter, IonAvatar, IonThumbnail, } from '@ionic/react'; import './style.scss'; import { chevronBackOutline, ellipsisHorizontal, ellipsisVertical, heart, logoIonic, } from 'ionicons/icons'; import AboutPopover from '../../components/AboutPopover'; import { format, parseISO } from 'date-fns'; import { TestContent } from './TestContent'; import { Helloworld } from '../../api/Helloworld'; import { getEventById } from '../../api/getEventById'; import { connect } from '../../data/connect'; import * as selectors from '../../data/selectors'; import { Event } from '../../models/Event'; import { RouteComponentProps } from 'react-router'; const leftShift: number = 10; const thumbnailSize: number = 40; interface OwnProps extends RouteComponentProps { event_detail?: Event; } interface StateProps {} interface DispatchProps {} interface EventDetailProps { avatars: string[]; } const AvatarRow: React.FC<{ avatars: string[] }> = ({ avatars }) => { const router = useIonRouter(); const [showPopover, setShowPopover] = useState(false); const [popoverEvent, setPopoverEvent] = useState(); const [location, setLocation] = useState<'madison' | 'austin' | 'chicago' | 'seattle'>('madison'); const [conferenceDate, setConferenceDate] = useState('2047-05-17T00:00:00-05:00'); const selectOptions = { header: 'Select a Location', }; const presentPopover = (e: React.MouseEvent) => { setPopoverEvent(e.nativeEvent); setShowPopover(true); }; function displayDate(date: string, dateFormat: string) { return format(parseISO(date), dateFormat); } const [eventDetail, setEventDetail] = useState(null); useEffect(() => { Helloworld(); getEventById('1').then(({ data }) => { console.log({ data }); setEventDetail(data); }); }, []); function handleBackOnClick() { router.goBack(); } return ( <>
{avatars.slice(0, 3).map((m_avatar, idx) => (
Silhouette of a person's head
))}
{' '} +{avatars.length - 3} going{' '}
); }; export default AvatarRow;