Skip to content

Commit e5304c6

Browse files
committed
Remove linkBox prop to fix Safari compatibility issues
1 parent 7ed8fc2 commit e5304c6

File tree

12 files changed

+27
-31
lines changed

12 files changed

+27
-31
lines changed

apps/dashboard/src/@/components/ui/table.stories.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,17 +113,15 @@ function TableDemo(props: {
113113
{invoices.map((invoice) => (
114114
<TableRow
115115
key={invoice.invoice}
116-
linkBox={props.linkBox}
116+
// linkBox={props.linkBox}
117117
className={cn(
118118
props.linkBox && "cursor-pointer hover:bg-accent/50",
119119
)}
120120
>
121121
<TableCell className="font-medium">
122122
<Link
123123
href={`/invoices/${invoice.invoice}`}
124-
className={cn(
125-
props.linkBox && "before:absolute before:inset-0",
126-
)}
124+
className={cn(props.linkBox && "before:inset-0")}
127125
>
128126
{invoice.invoice}
129127
</Link>

apps/dashboard/src/@/components/ui/table.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,19 @@ TableFooter.displayName = "TableFooter";
6565
const TableRow = React.forwardRef<
6666
HTMLTableRowElement,
6767
React.HTMLAttributes<HTMLTableRowElement> & {
68-
/**
69-
* Contain the absolutely position elements inside the row with position:relative + transform:translate(0)
70-
* transform:translate(0) is required because position:relative on tr element does not work on webkit
71-
*/
72-
linkBox?: boolean;
68+
// TODO: removed because it breaks in safari
69+
// /**
70+
// * Contain the absolutely position elements inside the row with position:relative + transform:translate(0)
71+
// * transform:translate(0) is required because position:relative on tr element does not work on webkit
72+
// */
73+
// linkBox?: boolean;
7374
}
74-
>(({ className, linkBox, ...props }, ref) => (
75+
>(({ className, ...props }, ref) => (
7576
<tr
7677
ref={ref}
7778
className={cn(
7879
"border-border border-b last:border-0 data-[state=selected]:bg-muted",
79-
linkBox && "relative translate-x-0 translate-y-0",
80+
// linkBox && "relative translate-x-0 translate-y-0",
8081
className,
8182
)}
8283
{...props}

apps/dashboard/src/app/(dashboard)/(bridge)/routes/components/server/routelist-row.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ export async function RouteListRow({
5252
]);
5353

5454
return (
55-
<TableRow linkBox className="hover:bg-accent/50">
55+
<TableRow className="hover:bg-accent/50">
5656
<TableCell>
5757
<div className="flex flex-row items-center gap-4">
5858
<div className="flex items-center gap-1">

apps/dashboard/src/app/(dashboard)/(chain)/chainlist/components/server/chainlist-row.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,17 +39,14 @@ export async function ChainListRow({
3939
}: ChainListRowProps) {
4040
const chainMetadata = await getChainMetadata(chainId);
4141
return (
42-
<TableRow linkBox className="hover:bg-accent/50">
42+
<TableRow className="hover:bg-accent/50">
4343
{/* Name */}
4444
<TableCell>
4545
<div className="flex w-[370px] flex-row items-center gap-4">
4646
<div className="flex items-center gap-2">
4747
{favoriteButton && <div className="mr-6"> {favoriteButton} </div>}
4848
<ChainIcon iconUrl={iconUrl} className="size-6" />
49-
<Link
50-
href={`/${chainSlug}`}
51-
className="group static before:absolute before:top-0 before:right-0 before:bottom-0 before:left-0 before:z-0 before:content-['']"
52-
>
49+
<Link href={`/${chainSlug}`} className="group static">
5350
{chainName}
5451
</Link>
5552

apps/dashboard/src/app/(dashboard)/profile/[addressOrEns]/components/PublishedContractTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function PublishedContractTable(props: PublishedContractTableProps) {
7575
href={replaceDeployerAddress(
7676
`/${publisherEnsName || cell.row.original.publisher}/${cell.row.original.id}`,
7777
)}
78-
className="whitespace-nowrap text-foreground before:absolute before:inset-0"
78+
className="whitespace-nowrap text-foreground"
7979
>
8080
{cell.value}
8181
</Link>
@@ -190,7 +190,7 @@ function ContractTableRow(props: {
190190
return (
191191
<>
192192
<TableRow
193-
linkBox
193+
// linkBox
194194
className="cursor-pointer hover:bg-card"
195195
{...rowProps}
196196
key={key}

apps/dashboard/src/app/team/[team_slug]/(team)/~/ecosystem/[slug]/(active)/configuration/components/server/partners-table.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function PartnerRow(props: {
8888

8989
return (
9090
<TableRow
91-
linkBox
91+
// linkBox
9292
className={cn("hover:bg-card", isDeleting && "animate-pulse")}
9393
>
9494
<TableCell className="max-w-32 truncate align-center">

apps/dashboard/src/app/team/[team_slug]/(team)/~/engine/(general)/overview/engine-instances-table.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ function EngineInstanceRow(props: {
164164
<>
165165
<TableRow
166166
className={instance.status === "active" ? "hover:bg-accent/50" : ""}
167-
linkBox
167+
// linkBox
168168
>
169169
<TableCell>
170170
<div className="flex items-center justify-between">
@@ -230,7 +230,7 @@ function InstanceNameLink(props: {
230230
) : (
231231
<Link
232232
href={`${props.engineLinkPrefix}/${props.instance.id}`}
233-
className="flex items-center text-foreground before:absolute before:inset-0 before:bg-transparent"
233+
className="flex items-center text-foreground"
234234
>
235235
{name}
236236
</Link>

apps/dashboard/src/app/team/[team_slug]/(team)/~/projects/TeamProjectsPage.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ export function TeamProjectsPage(props: {
166166
{paginatedProjects.map((project) => (
167167
<TableRow
168168
key={project.id}
169-
linkBox
169+
// linkBox
170170
className="hover:bg-accent/50"
171171
>
172172
<TableCell>
173173
<Link
174-
className="flex items-center gap-3 before:absolute before:inset-0"
174+
className="flex items-center gap-3"
175175
href={`/team/${props.team.slug}/${project.slug}`}
176176
>
177177
<ProjectAvatar

apps/dashboard/src/components/contract-components/contract-table/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ export async function DeployableContractTable(
5454
{deployedContractMetadata.map((metadata, i) => {
5555
return (
5656
<TableRow
57-
linkBox
57+
// linkBox
5858
className="cursor-pointer hover:bg-card"
5959
// biome-ignore lint/suspicious/noArrayIndexKey: static list
6060
key={i}
@@ -69,7 +69,7 @@ export async function DeployableContractTable(
6969
<Link
7070
target="_blank"
7171
href={`/contracts/${context}/${encodeURIComponent(metadata.contractId)}`}
72-
className="text-left text-muted-foreground before:absolute before:inset-0"
72+
className="text-left text-muted-foreground"
7373
>
7474
{metadata.name}
7575
</Link>

apps/dashboard/src/components/contract-components/tables/cells.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { usePublishedContractsFromDeploy } from "../hooks";
1717
export const ContractNameCell = memo(function ContractNameCell(props: {
1818
chainId: string;
1919
contractAddress: string;
20-
linkOverlay?: boolean;
20+
// linkOverlay?: boolean;
2121
}) {
2222
const chainSlug = useChainSlug(Number(props.chainId));
2323
const chain = useV5DashboardChain(Number(props.chainId));
@@ -44,7 +44,7 @@ export const ContractNameCell = memo(function ContractNameCell(props: {
4444
passHref
4545
className={cn(
4646
"text-foreground",
47-
props.linkOverlay && "before:absolute before:inset-0",
47+
// props.linkOverlay && "before:absolute before:inset-0",
4848
)}
4949
>
5050
{v || shortenIfAddress(props.contractAddress)}

0 commit comments

Comments
 (0)