Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions src/app/conf/2025/schedule/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,12 @@ export default function SessionPage({ params }: SessionProps) {
<ul className="flex max-w-full flex-col gap-y-2">
{session.files?.map(({ path, name }) => (
<li key={path}>
<iframe
src={path}
className="aspect-video size-full"
/>
{path.endsWith(".pdf") && canRenderPdf() ? (
<iframe
src={path}
className="aspect-video size-full"
/>
) : null}
<div className="flex items-stretch justify-between overflow-hidden">
<a
className="typography-link flex items-center truncate p-3 leading-none text-neu-700 max-xs:hidden sm:px-6"
Expand Down Expand Up @@ -295,3 +297,9 @@ function SessionDescription({ session }: { session: ScheduleSession }) {
</div>
)
}

const isFirefox = navigator.userAgent.toLowerCase().includes("firefox")

function canRenderPdf() {
return !isFirefox && !!navigator?.mimeTypes?.["application/pdf" as any]
}