Skip to content

Commit

Permalink
add: room on service sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
domysh committed Sep 18, 2024
1 parent cdaf0cf commit 1c3593d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/components/Schedule/ScheduleCard.astro
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
---
import type { ScheduleSlotRoom } from '../../data/types/sessionize';
import { getLangFromUrl, useTranslatedPath, useTranslations } from '../../i18n/utils';
interface Props {
value: ScheduleSlotRoom;
}
const { value } = Astro.props;
const lang = getLangFromUrl(Astro.url);
const t = useTranslations(lang);
const getPath = useTranslatedPath(lang);
const hasSpeakers = value.session.info && value.session.info.speakers;
Expand All @@ -16,14 +20,16 @@ const url = !value.session.isServiceSession
---

<a
href={url}
href={url?getPath(url):null}
class={`p-4 border border-gray-400 rounded-md ${
value.session.isServiceSession ? "h-52" : "xl:h-full h-52"
} flex flex-col`}
>
{!value.session.isServiceSession && <p class="mb-2">{value.name}</p>}
{!value.session.isServiceSession && <p class="mb-2">{value.name}</p>}
<p class="text-xl font-medium">{value.session.title}</p>

<div class="flex flex-row mt-auto justify-between align-center">
{value.session.isServiceSession && <p class="opacity-60">{t("session.room")}: {value.name}</p>}
<div class="mt-4 flex flex-col gap-2">
{
hasSpeakers &&
Expand Down

0 comments on commit 1c3593d

Please sign in to comment.