File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
src/app/conf/2025/schedule/[id] Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -127,10 +127,12 @@ export default function SessionPage({ params }: SessionProps) {
127
127
< ul className = "flex max-w-full flex-col gap-y-2" >
128
128
{ session . files ?. map ( ( { path, name } ) => (
129
129
< li key = { path } >
130
- < iframe
131
- src = { path }
132
- className = "aspect-video size-full"
133
- />
130
+ { path . endsWith ( ".pdf" ) && canRenderPdf ( ) ? (
131
+ < iframe
132
+ src = { path }
133
+ className = "aspect-video size-full"
134
+ />
135
+ ) : null }
134
136
< div className = "flex items-stretch justify-between overflow-hidden" >
135
137
< a
136
138
className = "typography-link flex items-center truncate p-3 leading-none text-neu-700 max-xs:hidden sm:px-6"
@@ -295,3 +297,9 @@ function SessionDescription({ session }: { session: ScheduleSession }) {
295
297
</ div >
296
298
)
297
299
}
300
+
301
+ const isFirefox = navigator . userAgent . toLowerCase ( ) . includes ( "firefox" )
302
+
303
+ function canRenderPdf ( ) {
304
+ return ! isFirefox && ! ! navigator ?. mimeTypes ?. [ "application/pdf" as any ]
305
+ }
You can’t perform that action at this time.
0 commit comments