feat : update
This commit is contained in:
@@ -56,6 +56,7 @@ import {
|
||||
} from "@/lib/guides/talents";
|
||||
import { parseYouTubeUrl } from "@/lib/guides/youtube";
|
||||
import { normalizeExtraRichText } from "@/lib/rich-text";
|
||||
import { DEFAULT_EXTRA_SHEET_COLUMN_WIDTH } from "@/lib/guides/extra-sheet";
|
||||
import { publicGuideSections } from "@/lib/guides/public-sections";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
@@ -1363,8 +1364,21 @@ function ExtraSectionContent({
|
||||
>
|
||||
<Table
|
||||
className={cn(exporting && "table-fixed")}
|
||||
style={exporting ? undefined : { minWidth: `${row.sheet.columns.length * 140}px` }}
|
||||
style={{
|
||||
minWidth: `${row.sheet.columns.reduce(
|
||||
(total, column) => total + (column.width ?? DEFAULT_EXTRA_SHEET_COLUMN_WIDTH),
|
||||
0,
|
||||
)}px`,
|
||||
}}
|
||||
>
|
||||
<colgroup>
|
||||
{row.sheet.columns.map((column) => (
|
||||
<col
|
||||
key={column.id}
|
||||
style={{ width: column.width ?? DEFAULT_EXTRA_SHEET_COLUMN_WIDTH }}
|
||||
/>
|
||||
))}
|
||||
</colgroup>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
{row.sheet.columns.map((column) => (
|
||||
@@ -1381,11 +1395,15 @@ function ExtraSectionContent({
|
||||
<TableCell
|
||||
key={column.id}
|
||||
className="border-l first:border-l-0 whitespace-normal"
|
||||
style={sheetRow.backgrounds?.[column.id]
|
||||
? { backgroundColor: sheetRow.backgrounds[column.id] }
|
||||
: undefined}
|
||||
style={{
|
||||
backgroundColor: sheetRow.backgrounds?.[column.id],
|
||||
textAlign: sheetRow.alignments?.[column.id] ?? "left",
|
||||
}}
|
||||
>
|
||||
<RichTextContent html={normalizeExtraRichText(sheetRow.cells[column.id] ?? "")} />
|
||||
<RichTextContent
|
||||
html={normalizeExtraRichText(sheetRow.cells[column.id] ?? "")}
|
||||
className="extra-sheet-text"
|
||||
/>
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
|
||||
Reference in New Issue
Block a user