@@ -2,7 +2,7 @@ import { Button, Chip, CircularProgress, Stack, styled, Table, TableBody, TableC
22import { ErrorBoundary , Suspense } from "@suspensive/react" ;
33import { DateTime } from "luxon" ;
44import * as React from "react" ;
5- import { useNavigate } from "react-router-dom" ;
5+ import { Link } from "react-router-dom" ;
66import * as R from "remeda" ;
77
88import Hooks from "../../hooks" ;
@@ -108,7 +108,6 @@ const SessionColumn: React.FC<{
108108 colSpan ?: number ;
109109 session : BackendAPISchemas . SessionSchema ;
110110} > = ( { rowSpan, colSpan, session } ) => {
111- const navigate = useNavigate ( ) ;
112111 const clickable = R . isArray ( session . speakers ) && ! R . isEmpty ( session . speakers ) ;
113112 // Firefox는 rowSpan된 td의 height를 계산할 때 rowSpan을 고려하지 않습니다. 따라서 직접 계산하여 height를 설정합니다.
114113 const sessionBoxHeight = `${ TD_HEIGHT * rowSpan } rem` ;
@@ -118,18 +117,32 @@ const SessionColumn: React.FC<{
118117 . replace ( / (? ! [ . 0 - 9 A - Z a - z ㄱ - ㅣ 가 - 힣 - ] ) ./ g, "" ) ;
119118 return (
120119 < SessionTableCell rowSpan = { rowSpan } colSpan = { colSpan } >
121- < SessionBox
122- onClick = { ( ) => clickable && navigate ( `/presentations/${ session . id } #${ urlSafeTitle } ` ) }
123- className = { clickable ? "clickable" : "" }
124- sx = { { height : sessionBoxHeight , gap : 0.75 , padding : "0.5rem" } }
125- >
126- < SessionTitle children = { session . title . replace ( "\\n" , "\n" ) } align = "center" />
127- < Stack direction = "row" alignItems = "center" justifyContent = "center" sx = { { width : "100%" , flexWrap : "wrap" , gap : 0.5 } } >
128- { session . speakers . map ( ( speaker ) => (
129- < Chip key = { speaker . id } size = "small" label = { speaker . nickname } />
130- ) ) }
131- </ Stack >
132- </ SessionBox >
120+ { clickable ? (
121+ < Link to = { `/presentations/${ session . id } #${ urlSafeTitle } ` } style = { { textDecoration : 'none' , display : 'block' } } >
122+ < SessionBox
123+ className = "clickable"
124+ sx = { { height : sessionBoxHeight , gap : 0.75 , padding : "0.5rem" } }
125+ >
126+ < SessionTitle children = { session . title . replace ( "\\n" , "\n" ) } align = "center" />
127+ < Stack direction = "row" alignItems = "center" justifyContent = "center" sx = { { width : "100%" , flexWrap : "wrap" , gap : 0.5 } } >
128+ { session . speakers . map ( ( speaker ) => (
129+ < Chip key = { speaker . id } size = "small" label = { speaker . nickname } />
130+ ) ) }
131+ </ Stack >
132+ </ SessionBox >
133+ </ Link >
134+ ) : (
135+ < SessionBox
136+ sx = { { height : sessionBoxHeight , gap : 0.75 , padding : "0.5rem" } }
137+ >
138+ < SessionTitle children = { session . title . replace ( "\\n" , "\n" ) } align = "center" />
139+ < Stack direction = "row" alignItems = "center" justifyContent = "center" sx = { { width : "100%" , flexWrap : "wrap" , gap : 0.5 } } >
140+ { session . speakers . map ( ( speaker ) => (
141+ < Chip key = { speaker . id } size = "small" label = { speaker . nickname } />
142+ ) ) }
143+ </ Stack >
144+ </ SessionBox >
145+ ) }
133146 </ SessionTableCell >
134147 ) ;
135148} ;
0 commit comments