import React from 'react'; import { Query } from 'react-apollo'; import { Typography } from '@material-ui/core'; import { DateTime } from 'luxon'; import BannerTopBar from '../BannerTopBar'; import { hostedEventsCalls } from '../../GraphQL/Calls/index'; import Event from './Event'; const HostedEvent = () => ( {({ loading, error, data }) => { if (loading) return 'Loading...'; if (error) return `Error! ${error.message}`; const list = data.events_Events.map((event, index) => ( )); return (
Unpublished : { list }
); }}
{({ loading, error, data }) => { if (loading) return 'Loading...'; if (error) return `Error! ${error.message}`; const list = data.events_Events.map((event, index) => ( )); return (
Published : { list }
); }}
{({ loading, error, data }) => { if (loading) return 'Loading...'; if (error) return `Error! ${error.message}`; const list = data.events_Events.map((event, index) => ( )); return (
Old : { list }
); }}
); export default HostedEvent;