chore(components): disable prefetching for links in admin components

This commit is contained in:
Fatih Kadir Akın
2025-12-18 13:44:14 +03:00
parent 2469e3bc19
commit 76dbd18048
4 changed files with 5 additions and 2 deletions

View File

@@ -72,6 +72,7 @@ function LeaderboardList({ users }: { users: LeaderboardUser[] }) {
<Link
key={user.id}
href={`/@${user.username}`}
prefetch={false}
className="flex items-center gap-4 p-3 hover:bg-muted/50 transition-colors"
>
<div className="w-8 flex justify-center">

View File

@@ -38,6 +38,7 @@ export default async function TagsPage() {
<Link
key={tag.id}
href={`/tags/${tag.slug}`}
prefetch={false}
className="group inline-flex items-center gap-2 px-3 py-1.5 rounded-full border transition-colors hover:border-foreground/30"
style={{
backgroundColor: tag.color + "10",

View File

@@ -643,7 +643,7 @@ export function PromptsManagement({ aiSearchEnabled, promptsWithoutEmbeddings, t
</div>
<div className="flex items-center gap-2 flex-shrink-0">
{prompt.id && (
<Link href={`/prompts/${prompt.id}`} target="_blank">
<Link href={`/prompts/${prompt.id}`} target="_blank" prefetch={false}>
<Button size="icon" variant="ghost" className="h-8 w-8">
<ExternalLink className="h-4 w-4" />
</Button>

View File

@@ -123,6 +123,7 @@ export function ReportsTable({ reports }: ReportsTableProps) {
<TableCell>
<Link
href={getPromptUrl(report.prompt.id, report.prompt.slug)}
prefetch={false}
className="font-medium hover:underline flex items-center gap-1"
>
{report.prompt.title}
@@ -172,7 +173,7 @@ export function ReportsTable({ reports }: ReportsTableProps) {
</DropdownMenuTrigger>
<DropdownMenuContent align="end">
<DropdownMenuItem asChild>
<Link href={getPromptUrl(report.prompt.id, report.prompt.slug)}>
<Link href={getPromptUrl(report.prompt.id, report.prompt.slug)} prefetch={false}>
<Eye className="h-4 w-4 mr-2" />
{t("viewPrompt")}
</Link>