Skip to content

Commit

Permalink
fixed bug with events with no sponsors
Browse files Browse the repository at this point in the history
  • Loading branch information
crtr0 committed Oct 3, 2023
1 parent 0caecbc commit 7b14d29
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/pages/events/$id.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import { marked } from "marked"
export default function ({ html, state = {} }) {
let { store = {} } = state
let event = store.events[0]
let hasTalks = event.talks && event.talks.length > 0
let { id, title, sponsors, description } = event

let { id, title, sponsors, talks, description } = event
let hasTalks = talks && talks.length > 0
let hasSponsors = sponsors && sponsors.length > 0
return html`
<page-layout title=${title}>
<h3>${title}</h3>
${description && `<p>${marked(description)}</p>` }
<h4>Thanks to our Sponsors ❤️</h4>
${sponsors ? html`<list-sponsors></list-sponsors>` : null}
${hasSponsors ? html`<list-sponsors></list-sponsors>` : null}
${hasTalks ? html`<list-talks event_id="${id}"></list-talks>`: html`<p>No talks were given durring this event.</p>`}
<div class="">
<a target="_self" href="/events">
Expand Down

0 comments on commit 7b14d29

Please sign in to comment.