@@ -189,8 +189,10 @@ function RatingDistribution({ product }: { product: ProductSummary }) {
189189 return (
190190 < div className = "flex flex-col gap-3" >
191191 < div className = "flex items-center justify-between gap-2" >
192- < h3 className = "text-sm font-medium text-gray-900" > { product . product_name } </ h3 >
193- < span className = "inline-flex items-center gap-1.5 rounded-full bg-amber-50 px-2.5 py-1 text-xs font-medium text-amber-700" >
192+ < h3 className = "min-w-0 break-words text-sm font-medium text-gray-900" >
193+ { product . product_name }
194+ </ h3 >
195+ < span className = "inline-flex shrink-0 items-center gap-1.5 rounded-full bg-amber-50 px-2.5 py-1 text-xs font-medium text-amber-700" >
194196 < span className = "text-amber-400" >
195197 < svg viewBox = "0 0 20 20" fill = "currentColor" className = "h-3.5 w-3.5" aria-hidden = "true" >
196198 < path d = "M10 1.5l2.4 4.9 5.4.8-3.9 3.8.92 5.4L10 13.9 5.18 16.4l.92-5.4L2.2 7.2l5.4-.8L10 1.5z" />
@@ -251,9 +253,11 @@ export function InsightReport({ result }: InsightReportProps) {
251253 < span className = "flex h-7 w-7 shrink-0 items-center justify-center rounded-full bg-brand-600 text-sm font-bold text-white shadow-sm shadow-brand-600/30" >
252254 { point . rank }
253255 </ span >
254- < div >
255- < p className = "font-medium text-gray-900" > { point . title } </ p >
256- < p className = "mt-0.5 text-sm text-gray-600" > { point . detail } </ p >
256+ < div className = "min-w-0" >
257+ < p className = "font-medium text-gray-900 break-words" > { point . title } </ p >
258+ < p className = "mt-0.5 text-sm leading-relaxed text-gray-600 break-words" >
259+ { point . detail }
260+ </ p >
257261 </ div >
258262 </ li >
259263 ) ) }
@@ -276,14 +280,14 @@ export function InsightReport({ result }: InsightReportProps) {
276280 key = { i }
277281 className = "rounded-lg border border-amber-100 bg-amber-50/50 p-3.5 transition-colors hover:bg-amber-50"
278282 >
279- < p className = "font-medium text-gray-900" > { weakness . title } </ p >
280- < p className = "mt-1 flex items-start gap-1.5 text-sm text-amber-800" >
281- < span className = "mt-0.5 text-amber-500" aria-hidden = "true" >
283+ < p className = "font-medium text-gray-900 break-words " > { weakness . title } </ p >
284+ < p className = "mt-1 flex items-start gap-1.5 text-sm leading-relaxed text-amber-800" >
285+ < span className = "mt-0.5 shrink-0 text-amber-500" aria-hidden = "true" >
282286 < svg viewBox = "0 0 20 20" fill = "currentColor" className = "h-4 w-4" >
283287 < path d = "M10 1l2.5 5.5L18 7l-4 4 1 6-5-2.8L5 17l1-6-4-4 5.5-.5L10 1z" />
284288 </ svg >
285289 </ span >
286- { weakness . opportunity }
290+ < span className = "min-w-0 break-words" > { weakness . opportunity } </ span >
287291 </ p >
288292 </ li >
289293 ) ) }
@@ -304,9 +308,9 @@ export function InsightReport({ result }: InsightReportProps) {
304308 { insights . purchase_drivers . map ( ( driver , i ) => (
305309 < li
306310 key = { i }
307- className = "inline-flex items-center gap-1.5 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-sm font-medium text-emerald-700"
311+ className = "inline-flex max-w-full items-center gap-1.5 rounded-full border border-emerald-200 bg-emerald-50 px-3 py-1 text-sm font-medium text-emerald-700"
308312 >
309- < span className = "text-emerald-500" aria-hidden = "true" >
313+ < span className = "shrink-0 text-emerald-500" aria-hidden = "true" >
310314 < svg viewBox = "0 0 20 20" fill = "currentColor" className = "h-3.5 w-3.5" >
311315 < path fillRule = "evenodd" d = "M16.7 5.3a1 1 0 010 1.4l-7.5 7.5a1 1 0 01-1.4 0l-3.5-3.5a1 1 0 111.4-1.4l2.8 2.79 6.8-6.79a1 1 0 011.4 0z" clipRule = "evenodd" />
312316 </ svg >
@@ -324,7 +328,7 @@ export function InsightReport({ result }: InsightReportProps) {
324328 accent = "brand"
325329 icon = { < ScaleIcon /> }
326330 >
327- < div className = "grid gap-5 sm:grid-cols-2" >
331+ < div className = "grid gap-4 sm:grid-cols-2" >
328332 < div className = "rounded-lg border border-red-100 bg-red-50/40 p-4" >
329333 < h3 className = "mb-3 flex items-center gap-1.5 text-sm font-semibold text-red-700" >
330334 < span className = "text-red-400" aria-hidden = "true" >
@@ -340,7 +344,7 @@ export function InsightReport({ result }: InsightReportProps) {
340344 < ul className = "flex flex-col gap-2" >
341345 { insights . top_complaints . map ( ( c , i ) => (
342346 < li key = { i } className = "flex items-center justify-between gap-2" >
343- < span className = "text-sm text-gray-800" > { c . text } </ span >
347+ < span className = "min-w-0 break-words text-sm text-gray-800" > { c . text } </ span >
344348 < span className = "flex shrink-0 items-center gap-2" >
345349 < Badge variant = { severityVariant ( c . severity ) } >
346350 { severityLabel ( c . severity ) }
@@ -367,8 +371,8 @@ export function InsightReport({ result }: InsightReportProps) {
367371 < ul className = "flex flex-col gap-2" >
368372 { insights . top_positives . map ( ( p , i ) => (
369373 < li key = { i } className = "flex items-center justify-between gap-2" >
370- < span className = "text-sm text-gray-800" > { p . text } </ span >
371- < span className = "text-xs text-gray-500" > { p . count } 회</ span >
374+ < span className = "min-w-0 break-words text-sm text-gray-800" > { p . text } </ span >
375+ < span className = "shrink-0 text-xs text-gray-500" > { p . count } 회</ span >
372376 </ li >
373377 ) ) }
374378 </ ul >
0 commit comments