Skip to content
This repository was archived by the owner on May 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/components/primitives/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,16 @@ export function Table<T extends Columns>({
// biome-ignore lint/suspicious/noExplicitAny: please forgive this any
const headers = useHeaders(columns, sortable, onHeaderClick, sort ?? sortBy, order ?? _order, props as any);

const indexOffset = useMemo(() => {
if (!!header && !hideLabels) return 0;
if (!header && !hideLabels) return 1;
if (!!header && hideLabels) return 1;
return 0;
}, [header, hideLabels]);

return (
<List indexOffset={header ? 0 : 1} className={mergeClass(className)} look={look} {...props}>
{!!header ? <Box className="bg-auto">{header}</Box> : undefined}
<List indexOffset={indexOffset} className={mergeClass(className)} look={look} {...props}>
{!!header ? header : undefined}
{/* biome-ignore lint/suspicious/noExplicitAny: please forgive this one as well */}
{!hideLabels ? <Row {...(headers as any)} columns={columns} /> : undefined}
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/primitives/Time.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function Time({ timestamp, prefix }: TimeProps) {
const then = moment(Number(timestamp)).fromNow();

return then
.replace(/in\s/, prefix ? `${prefix} ` : "In ")
.replace(/in\s/, prefix ? `${prefix} ` : "End in ")
.replace(/a\s/, "1 ")
.replace(/\bminute(s?)\b/g, "m")
.replace(/\bsecond(s?)\b/g, "s")
Expand Down