Skip to content

Commit

Permalink
Use Link for prefetching
Browse files Browse the repository at this point in the history
  • Loading branch information
bcbogdan committed Jan 1, 2025
1 parent e630763 commit a5596c2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5,194 deletions.
11 changes: 6 additions & 5 deletions v3/src/components/Cards/ReferenceCard/ReferenceCard.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import { Card, Flex, Avatar, Grid, Box, Text } from "@radix-ui/themes";
import Link from "@docusaurus/Link";

import "./styles.scss";

Expand All @@ -18,24 +19,24 @@ function ReferenceCardRoot({
return (
<Box p="4" asChild>
<Card className="reference-card" asChild>
<a href={href}>
<Link to={href}>
<Flex gap="3" align="center">
{children}
</Flex>
</a>
</Link>
</Card>
</Box>
);
}

return (
<Box p="5" asChild>
<Card className="reference-card" asChild>
<a href={href}>
<Card className="reference-card">
<Link to={href}>
<Flex gap="3" direction="column">
{children}
</Flex>
</a>
</Link>
</Card>
</Box>
);
Expand Down
Loading

0 comments on commit a5596c2

Please sign in to comment.