fix(ts)
This commit is contained in:
@@ -37,6 +37,7 @@ const OverviewTopBots = ({ projectId }: Props) => {
|
|||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
name: 'Path',
|
name: 'Path',
|
||||||
|
width: 'w-full',
|
||||||
render(item) {
|
render(item) {
|
||||||
return (
|
return (
|
||||||
<Tooltiper asChild content={item.path}>
|
<Tooltiper asChild content={item.path}>
|
||||||
@@ -47,6 +48,7 @@ const OverviewTopBots = ({ projectId }: Props) => {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'Date',
|
name: 'Date',
|
||||||
|
width: '100px',
|
||||||
render(item) {
|
render(item) {
|
||||||
return (
|
return (
|
||||||
<div className="flex gap-2 whitespace-nowrap">
|
<div className="flex gap-2 whitespace-nowrap">
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export function OverviewWidgetTableLoading({
|
|||||||
{
|
{
|
||||||
name: 'Path',
|
name: 'Path',
|
||||||
render: () => <Skeleton className="h-4 w-1/3" />,
|
render: () => <Skeleton className="h-4 w-1/3" />,
|
||||||
width: '1fr',
|
width: 'w-full',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'BR',
|
name: 'BR',
|
||||||
@@ -134,7 +134,7 @@ export function OverviewWidgetTablePages({
|
|||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
name: 'Path',
|
name: 'Path',
|
||||||
width: '1fr',
|
width: 'w-full',
|
||||||
render(item) {
|
render(item) {
|
||||||
return (
|
return (
|
||||||
<Tooltiper asChild content={item.origin + item.path} side="left">
|
<Tooltiper asChild content={item.origin + item.path} side="left">
|
||||||
@@ -233,7 +233,7 @@ export function OverviewWidgetTableBots({
|
|||||||
columns={[
|
columns={[
|
||||||
{
|
{
|
||||||
name: 'Path',
|
name: 'Path',
|
||||||
width: '1fr',
|
width: 'w-full',
|
||||||
render(item) {
|
render(item) {
|
||||||
return (
|
return (
|
||||||
<Tooltiper asChild content={item.origin + item.path} side="left">
|
<Tooltiper asChild content={item.origin + item.path} side="left">
|
||||||
@@ -296,7 +296,6 @@ export function OverviewWidgetTableGeneric({
|
|||||||
data: RouterOutputs['overview']['topGeneric'];
|
data: RouterOutputs['overview']['topGeneric'];
|
||||||
column: {
|
column: {
|
||||||
name: string;
|
name: string;
|
||||||
width: string;
|
|
||||||
render: (
|
render: (
|
||||||
item: RouterOutputs['overview']['topGeneric'][number],
|
item: RouterOutputs['overview']['topGeneric'][number],
|
||||||
) => React.ReactNode;
|
) => React.ReactNode;
|
||||||
@@ -311,7 +310,10 @@ export function OverviewWidgetTableGeneric({
|
|||||||
keyExtractor={(item) => item.name}
|
keyExtractor={(item) => item.name}
|
||||||
getColumnPercentage={(item) => item.sessions / maxSessions}
|
getColumnPercentage={(item) => item.sessions / maxSessions}
|
||||||
columns={[
|
columns={[
|
||||||
column,
|
{
|
||||||
|
...column,
|
||||||
|
width: 'w-full',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'BR',
|
name: 'BR',
|
||||||
width: '60px',
|
width: '60px',
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ export function Tables({
|
|||||||
<span className="truncate">{item.event.displayName}</span>
|
<span className="truncate">{item.event.displayName}</span>
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
width: '1fr',
|
width: 'w-full',
|
||||||
className: 'text-left font-mono font-semibold',
|
className: 'text-left font-mono font-semibold',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -95,9 +95,11 @@ export function WidgetTable<T>({
|
|||||||
? 'text-right'
|
? 'text-right'
|
||||||
: 'text-left',
|
: 'text-left',
|
||||||
column.className,
|
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)}
|
{column.render(item, index)}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user