feat : i dont even know what am i doing right now
CI / Verify (push) Successful in 2m20s
CI / Build immutable images and deploy (push) Successful in 2m57s

This commit is contained in:
2026-10-10 04:33:08 +07:00 Unverified
parent e723471707
commit 35f9dc40ba
10 changed files with 994 additions and 63 deletions
+25 -16
View File
@@ -57,6 +57,7 @@ import { normalizeExtraRichText } from "@/lib/rich-text";
import {
DEFAULT_EXTRA_SHEET_COLUMN_WIDTH,
extraSheetUsedRange,
extraSheetMergeMap,
} from "@/lib/guides/extra-sheet";
import { publicGuideSections } from "@/lib/guides/public-sections";
import { cn } from "@/lib/utils";
@@ -1231,6 +1232,7 @@ function ExtraSectionContent({
<div className={cn("relative z-10 grid gap-5 md:grid-cols-2", exporting && "grid-cols-2")}>
{extra.rows.map((row) => {
const displaySheet = row.sheet ? extraSheetUsedRange(row.sheet) : null;
const merges = displaySheet ? extraSheetMergeMap(displaySheet) : null;
return (
<Card
key={row.id}
@@ -1325,23 +1327,30 @@ function ExtraSectionContent({
</TableRow>
</TableHeader>
<TableBody>
{displaySheet.rows.map((sheetRow) => (
{displaySheet.rows.map((sheetRow, rowIndex) => (
<TableRow key={sheetRow.id}>
{displaySheet.columns.map((column) => (
<TableCell
key={column.id}
className="border-l first:border-l-0 whitespace-normal"
style={{
backgroundColor: sheetRow.backgrounds?.[column.id],
textAlign: sheetRow.alignments?.[column.id] ?? "left",
}}
>
<RichTextContent
html={normalizeExtraRichText(sheetRow.cells[column.id] ?? "")}
className="extra-sheet-text extra-sheet-text--public"
/>
</TableCell>
))}
{displaySheet.columns.map((column, columnIndex) => {
const merge = merges?.get(`${rowIndex}:${columnIndex}`);
if (merge && (merge.start.row !== rowIndex || merge.start.column !== columnIndex)) return null;
return (
<TableCell
rowSpan={merge ? merge.end.row - rowIndex + 1 : undefined}
colSpan={merge ? merge.end.column - columnIndex + 1 : undefined}
key={column.id}
className="border-l first:border-l-0 whitespace-normal"
style={{
backgroundColor: sheetRow.backgrounds?.[column.id],
textAlign: sheetRow.alignments?.[column.id] ?? "left",
verticalAlign: sheetRow.verticalAlignments?.[column.id] ?? "top",
}}
>
<RichTextContent
html={normalizeExtraRichText(sheetRow.cells[column.id] ?? "")}
className="extra-sheet-text extra-sheet-text--public"
/>
</TableCell>
);
})}
</TableRow>
))}
</TableBody>