import { useEffect, useState } from 'preact/hooks' const endpoint = 'https://kultar.sout.no/events/' const fetch_options = {} function Link(props) { return ; } function Facebook({ event_id }) { const facebook_event_url = `https://facebook.com/events/${event_id}/` return ( Mer info ) } function Tickets({ ticket_url }) { return ( Kjøp billett ) } function Time({ date }) { const hasTime = date.getHours() === 0 const time_option = hasTime ? undefined : 'numeric' const options = { month: 'long', weekday: 'long', day: 'numeric', hour: time_option, minute: time_option, } return
{host}, {area}.
) } if (hasHost) { return{host}.
} if (hasArea) { return{area}.
} return '' } function Links({ event_id, ticket_url }) { if (ticket_url !== null) { return ( <>Laster arrangement...
} if (events.length <= 0) { returnDet er ingen fremtidige arrangement.
} return ( <> {events.map((event, index) => (