This commit is contained in:
Carl-Gerhard Lindesvärd
2025-03-24 19:06:38 +01:00
parent b77ee71445
commit f06f1b7b8f
4 changed files with 14 additions and 8 deletions

View File

@@ -37,6 +37,7 @@ const OverviewTopBots = ({ projectId }: Props) => {
columns={[
{
name: 'Path',
width: 'w-full',
render(item) {
return (
<Tooltiper asChild content={item.path}>
@@ -47,6 +48,7 @@ const OverviewTopBots = ({ projectId }: Props) => {
},
{
name: 'Date',
width: '100px',
render(item) {
return (
<div className="flex gap-2 whitespace-nowrap">

View File

@@ -72,7 +72,7 @@ export function OverviewWidgetTableLoading({
{
name: 'Path',
render: () => <Skeleton className="h-4 w-1/3" />,
width: '1fr',
width: 'w-full',
},
{
name: 'BR',
@@ -134,7 +134,7 @@ export function OverviewWidgetTablePages({
columns={[
{
name: 'Path',
width: '1fr',
width: 'w-full',
render(item) {
return (
<Tooltiper asChild content={item.origin + item.path} side="left">
@@ -233,7 +233,7 @@ export function OverviewWidgetTableBots({
columns={[
{
name: 'Path',
width: '1fr',
width: 'w-full',
render(item) {
return (
<Tooltiper asChild content={item.origin + item.path} side="left">
@@ -296,7 +296,6 @@ export function OverviewWidgetTableGeneric({
data: RouterOutputs['overview']['topGeneric'];
column: {
name: string;
width: string;
render: (
item: RouterOutputs['overview']['topGeneric'][number],
) => React.ReactNode;
@@ -311,7 +310,10 @@ export function OverviewWidgetTableGeneric({
keyExtractor={(item) => item.name}
getColumnPercentage={(item) => item.sessions / maxSessions}
columns={[
column,
{
...column,
width: 'w-full',
},
{
name: 'BR',
width: '60px',

View File

@@ -212,7 +212,7 @@ export function Tables({
<span className="truncate">{item.event.displayName}</span>
</div>
),
width: '1fr',
width: 'w-full',
className: 'text-left font-mono font-semibold',
},
{

View File

@@ -95,9 +95,11 @@ export function WidgetTable<T>({
? 'text-right'
: 'text-left',
column.className,
column.width === '1fr' && 'w-full min-w-0',
column.width === 'w-full' && 'w-full min-w-0',
)}
style={{ width: column.width }}
style={
column.width !== 'w-full' ? { width: column.width } : {}
}
>
{column.render(item, index)}
</div>