From 0bc2e1d96a6ea266e57cca9180995e5942f6af96 Mon Sep 17 00:00:00 2001 From: Krzysztof Kocot Date: Mon, 15 Dec 2025 13:17:24 +0100 Subject: [PATCH 1/3] Add global Link wrapper with prefetch disabled by default - Create Link component in @hive/ui that wraps next/link with prefetch={false} - Migrate all direct next/link imports to use @hive/ui Link (58 files) - Add ESLint no-restricted-imports rule to prevent direct next/link usage - Add eslint-disable comment for BasePathLink which needs direct access This prevents excessive server-side API calls caused by Next.js automatic prefetching when Link components appear in viewport. --- .../(user-profile)/communities/content.tsx | 2 +- .../app/[param]/[p2]/[permlink]/content.tsx | 2 +- apps/blog/app/communities/content.tsx | 2 +- apps/blog/components/base-path-link.tsx | 1 + apps/blog/components/custom-error.tsx | 2 +- apps/blog/components/no-data-error.tsx | 2 +- apps/blog/components/rocket-chat-widget.tsx | 2 +- .../blog/features/account-lists/list-area.tsx | 2 +- .../account-social/subscription-list-item.tsx | 2 +- apps/blog/features/activity-log/list-item.tsx | 2 +- .../communities-list-item.tsx | 2 +- .../features/layouts/account-posts/tabs.tsx | 2 +- .../features/layouts/communities-my-bar.tsx | 2 +- .../layouts/community/communities-sidebar.tsx | 2 +- .../layouts/community/new-post-button.tsx | 2 +- apps/blog/features/layouts/explore-hive.tsx | 2 +- apps/blog/features/layouts/sidebar.tsx | 2 +- .../features/layouts/site-header/main-bar.tsx | 2 +- .../features/layouts/site-header/main-nav.tsx | 2 +- .../layouts/site-header/search-button.tsx | 2 +- .../layouts/site-header/user-menu.tsx | 2 +- .../layouts/user-profile/list-item.tsx | 2 +- .../layouts/user-profile/profile-layout.tsx | 2 +- .../list-of-posts/payout-hover-content.tsx | 2 +- .../post-card-comment-tooltip.tsx | 2 +- .../list-of-posts/post-card-hidden.tsx | 2 +- apps/blog/features/list-of-posts/post-img.tsx | 2 +- .../features/list-of-posts/post-list-item.tsx | 2 +- apps/blog/features/list-of-posts/summary.tsx | 2 +- .../advanced-settings-post-form.tsx | 2 +- apps/blog/features/post-editor/post-form.tsx | 2 +- .../features/post-editor/reply-textbox.tsx | 2 +- .../post-rendering/comment-list-item.tsx | 2 +- .../features/post-rendering/context-links.tsx | 2 +- .../post-rendering/leave-page-dialog.tsx | 2 +- .../post-rendering/share-post-dialog.tsx | 2 +- .../features/post-rendering/user-info.tsx | 2 +- .../features/search/account-topic-result.tsx | 2 +- apps/blog/features/suggestions-posts/card.tsx | 2 +- .../components/authorities-group-item.tsx | 2 +- .../components/common/profile-layout.tsx | 2 +- apps/wallet/components/main-nav.tsx | 2 +- apps/wallet/components/mobile-nav.tsx | 2 +- .../wallet/components/proposals-list-item.tsx | 2 +- apps/wallet/components/sidebar.tsx | 2 +- apps/wallet/components/site-header.tsx | 2 +- apps/wallet/components/user-menu.tsx | 2 +- apps/wallet/components/voters-item.tsx | 2 +- apps/wallet/components/wallet-menu.tsx | 2 +- .../witness-vote-expiry-warning.tsx | 2 +- .../wallet/components/witnesses-list-item.tsx | 2 +- apps/wallet/feature/delegations/rc-row.tsx | 2 +- apps/wallet/pages/404.tsx | 2 +- apps/wallet/pages/[param]/author-rewards.tsx | 2 +- apps/wallet/pages/[param]/communities.tsx | 2 +- .../wallet/pages/[param]/curation-rewards.tsx | 2 +- apps/wallet/pages/[param]/password.tsx | 2 +- apps/wallet/pages/[param]/permissions.tsx | 2 +- apps/wallet/pages/[param]/transfers.tsx | 2 +- packages/eslint-config-custom/index.js | 15 +++++++++++++- packages/ui/components/index.tsx | 1 + packages/ui/components/link.tsx | 20 +++++++++++++++++++ 62 files changed, 94 insertions(+), 59 deletions(-) create mode 100644 packages/ui/components/link.tsx diff --git a/apps/blog/app/[param]/(user-profile)/communities/content.tsx b/apps/blog/app/[param]/(user-profile)/communities/content.tsx index 271bb5b7f..ce78c6ae4 100644 --- a/apps/blog/app/[param]/(user-profile)/communities/content.tsx +++ b/apps/blog/app/[param]/(user-profile)/communities/content.tsx @@ -7,7 +7,7 @@ import { useQuery } from '@tanstack/react-query'; import { getSubscriptions } from '@transaction/lib/bridge-api'; import { getHivebuzzBadges, getPeakdBadges } from '@transaction/lib/custom-api'; import { getUserAvatarUrl } from '@ui/lib/avatar-utils'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const CommunityContent = ({ username }: { username: string }) => { const { t } = useTranslation('common_blog'); diff --git a/apps/blog/app/[param]/[p2]/[permlink]/content.tsx b/apps/blog/app/[param]/[p2]/[permlink]/content.tsx index e841ca25b..171b2f707 100644 --- a/apps/blog/app/[param]/[p2]/[permlink]/content.tsx +++ b/apps/blog/app/[param]/[p2]/[permlink]/content.tsx @@ -56,7 +56,7 @@ import { handleError } from '@ui/lib/handle-error'; import parseDate from '@ui/lib/parse-date'; import { Clock, Link2 } from 'lucide-react'; import moment from 'moment'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useParams, usePathname, useRouter, useSearchParams } from 'next/navigation'; import { useEffect, useMemo, useState } from 'react'; import { CircleSpinner } from 'react-spinners-kit'; diff --git a/apps/blog/app/communities/content.tsx b/apps/blog/app/communities/content.tsx index 159646d5d..6415864a5 100644 --- a/apps/blog/app/communities/content.tsx +++ b/apps/blog/app/communities/content.tsx @@ -8,7 +8,7 @@ import { Separator } from '@ui/components/separator'; import CommunitiesSelectFilter from '@/blog/features/communities-list/communities-select-filter'; import CommunitiesList from '@/blog/features/communities-list/communities-list'; import { useUserClient } from '@smart-signer/lib/auth/use-user-client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import env from '@beam-australia/react-env'; import { getCommunities } from '@transaction/lib/bridge-api'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/components/base-path-link.tsx b/apps/blog/components/base-path-link.tsx index 4b01b8f82..b0a133781 100644 --- a/apps/blog/components/base-path-link.tsx +++ b/apps/blog/components/base-path-link.tsx @@ -1,3 +1,4 @@ +// eslint-disable-next-line no-restricted-imports -- This is a wrapper component that needs direct access to next/link import Link from 'next/link'; import { MouseEvent, ReactNode } from 'react'; diff --git a/apps/blog/components/custom-error.tsx b/apps/blog/components/custom-error.tsx index 630eb70ac..47d902973 100644 --- a/apps/blog/components/custom-error.tsx +++ b/apps/blog/components/custom-error.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Icons } from '@ui/components/icons'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/components/no-data-error.tsx b/apps/blog/components/no-data-error.tsx index d88726b42..f4509c7ec 100644 --- a/apps/blog/components/no-data-error.tsx +++ b/apps/blog/components/no-data-error.tsx @@ -1,5 +1,5 @@ import { FC } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Icons } from '@ui/components/icons'; import { Activity } from 'lucide-react'; diff --git a/apps/blog/components/rocket-chat-widget.tsx b/apps/blog/components/rocket-chat-widget.tsx index 2c5f08e8b..24685cb5b 100644 --- a/apps/blog/components/rocket-chat-widget.tsx +++ b/apps/blog/components/rocket-chat-widget.tsx @@ -5,7 +5,7 @@ import { Drawer } from '@ui/components/drawer'; import { useState, useRef, useEffect } from 'react'; import { siteConfig } from '@ui/config/site'; import { LoginType } from '@smart-signer/types/common'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Button } from '@ui/components/button'; import { inIframe } from '@smart-signer/lib/utils'; import clsx from 'clsx'; diff --git a/apps/blog/features/account-lists/list-area.tsx b/apps/blog/features/account-lists/list-area.tsx index ab0186eff..18d0ed37e 100644 --- a/apps/blog/features/account-lists/list-area.tsx +++ b/apps/blog/features/account-lists/list-area.tsx @@ -1,6 +1,6 @@ import { Button } from '@ui/components/button'; import { Input } from '@ui/components/input'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@ui/components/accordion'; import clsx from 'clsx'; import { IFollowList } from '@transaction/lib/extended-hive.chain'; diff --git a/apps/blog/features/account-social/subscription-list-item.tsx b/apps/blog/features/account-social/subscription-list-item.tsx index b228df340..7637a7c00 100644 --- a/apps/blog/features/account-social/subscription-list-item.tsx +++ b/apps/blog/features/account-social/subscription-list-item.tsx @@ -1,7 +1,7 @@ 'use client'; import { Badge } from '@hive/ui'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const SubscriptionListItem = ({ community }: { community: string[] }) => { return ( diff --git a/apps/blog/features/activity-log/list-item.tsx b/apps/blog/features/activity-log/list-item.tsx index 7febcb3de..d8bc591d5 100644 --- a/apps/blog/features/activity-log/list-item.tsx +++ b/apps/blog/features/activity-log/list-item.tsx @@ -6,7 +6,7 @@ import { Avatar, AvatarFallback, AvatarImage } from '@ui/components/avatar'; import { IAccountNotification } from '@transaction/lib/extended-hive.chain'; import { useUserClient } from '@smart-signer/lib/auth/use-user-client'; import { usePathname } from 'next/navigation'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const usernamePattern = /\B@[a-z0-9.-]+/gi; diff --git a/apps/blog/features/communities-list/communities-list-item.tsx b/apps/blog/features/communities-list/communities-list-item.tsx index 5db6266df..dc44209ce 100644 --- a/apps/blog/features/communities-list/communities-list-item.tsx +++ b/apps/blog/features/communities-list/communities-list-item.tsx @@ -2,7 +2,7 @@ import { cn } from '@ui/lib/utils'; import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@hive/ui/components/card'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import BasePathLink from '@/blog/components/base-path-link'; import { Community } from '@transaction/lib/extended-hive.chain'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/features/layouts/account-posts/tabs.tsx b/apps/blog/features/layouts/account-posts/tabs.tsx index 4382f1b7b..23e3dbba1 100644 --- a/apps/blog/features/layouts/account-posts/tabs.tsx +++ b/apps/blog/features/layouts/account-posts/tabs.tsx @@ -2,7 +2,7 @@ import { useTranslation } from '@/blog/i18n/client'; import { Tabs, TabsContent, TabsList, TabsTrigger } from '@ui/components/tabs'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { usePathname } from 'next/navigation'; import { ReactNode } from 'react'; diff --git a/apps/blog/features/layouts/communities-my-bar.tsx b/apps/blog/features/layouts/communities-my-bar.tsx index b5e928ba8..9a6f2622b 100644 --- a/apps/blog/features/layouts/communities-my-bar.tsx +++ b/apps/blog/features/layouts/communities-my-bar.tsx @@ -1,6 +1,6 @@ 'use client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { cn } from '@ui/lib/utils'; import { Card, CardContent, CardTitle } from '@hive/ui/components/card'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/features/layouts/community/communities-sidebar.tsx b/apps/blog/features/layouts/community/communities-sidebar.tsx index 43606717e..5e71c2f2f 100644 --- a/apps/blog/features/layouts/community/communities-sidebar.tsx +++ b/apps/blog/features/layouts/community/communities-sidebar.tsx @@ -1,6 +1,6 @@ 'use client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useQuery } from '@tanstack/react-query'; import { getCommunities } from '@transaction/lib/bridge-api'; import { cn } from '@ui/lib/utils'; diff --git a/apps/blog/features/layouts/community/new-post-button.tsx b/apps/blog/features/layouts/community/new-post-button.tsx index 745c7aedf..28185f52b 100644 --- a/apps/blog/features/layouts/community/new-post-button.tsx +++ b/apps/blog/features/layouts/community/new-post-button.tsx @@ -1,6 +1,6 @@ import { useLocalStorage } from 'usehooks-ts'; import { Button } from '@ui/components'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { DEFAULT_PREFERENCES, Preferences } from '@/blog/lib/utils'; import { useUserClient } from '@smart-signer/lib/auth/use-user-client'; import { useTranslation } from '../../../i18n/client'; diff --git a/apps/blog/features/layouts/explore-hive.tsx b/apps/blog/features/layouts/explore-hive.tsx index b68973000..07c27c537 100644 --- a/apps/blog/features/layouts/explore-hive.tsx +++ b/apps/blog/features/layouts/explore-hive.tsx @@ -1,7 +1,7 @@ import { cn } from '@ui/lib/utils'; import { Card, CardContent, CardHeader, CardTitle } from '@hive/ui/components/card'; import { FC } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Icons } from '@ui/components/icons'; import env from '@beam-australia/react-env'; diff --git a/apps/blog/features/layouts/sidebar.tsx b/apps/blog/features/layouts/sidebar.tsx index 79d5519b5..668ff397c 100644 --- a/apps/blog/features/layouts/sidebar.tsx +++ b/apps/blog/features/layouts/sidebar.tsx @@ -1,7 +1,7 @@ import { Button } from '@ui/components/button'; import { Icons } from '@ui/components/icons'; import { Sheet, SheetContent, SheetTrigger, SheetClose } from '@ui/components/sheet'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import BasePathLink from '../../components/base-path-link'; import { Separator } from '@ui/components/separator'; import { ReactNode } from 'react'; diff --git a/apps/blog/features/layouts/site-header/main-bar.tsx b/apps/blog/features/layouts/site-header/main-bar.tsx index 106ea270a..8118b7733 100644 --- a/apps/blog/features/layouts/site-header/main-bar.tsx +++ b/apps/blog/features/layouts/site-header/main-bar.tsx @@ -4,7 +4,7 @@ import { Button } from '@ui/components/button'; import { Icons } from '@ui/components/icons'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@ui/components/tooltip'; import { siteConfig } from '@ui/config/site'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import React, { useState, FC, useEffect } from 'react'; import clsx from 'clsx'; import { useUserClient } from '@smart-signer/lib/auth/use-user-client'; diff --git a/apps/blog/features/layouts/site-header/main-nav.tsx b/apps/blog/features/layouts/site-header/main-nav.tsx index 4ae6cedbd..db877e189 100644 --- a/apps/blog/features/layouts/site-header/main-nav.tsx +++ b/apps/blog/features/layouts/site-header/main-nav.tsx @@ -1,6 +1,6 @@ 'use client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { usePathname } from 'next/navigation'; import { cn } from '@ui/lib/utils'; diff --git a/apps/blog/features/layouts/site-header/search-button.tsx b/apps/blog/features/layouts/site-header/search-button.tsx index c835bceae..946a9bfd5 100644 --- a/apps/blog/features/layouts/site-header/search-button.tsx +++ b/apps/blog/features/layouts/site-header/search-button.tsx @@ -4,7 +4,7 @@ import { Button } from '@ui/components/button'; import { Icons } from '@ui/components/icons'; import TooltipContainer from '@ui/components/tooltip-container'; import { cn } from '@ui/lib/utils'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const SearchButton = ({ aiTag, className }: { aiTag: boolean; className?: string }) => { return ( diff --git a/apps/blog/features/layouts/site-header/user-menu.tsx b/apps/blog/features/layouts/site-header/user-menu.tsx index 7def9e8d3..5652ac914 100644 --- a/apps/blog/features/layouts/site-header/user-menu.tsx +++ b/apps/blog/features/layouts/site-header/user-menu.tsx @@ -9,7 +9,7 @@ import { } from '@ui/components/dropdown-menu'; import { ReactNode } from 'react'; import ModeToggle from '../mode-toggle'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import BasePathLink from '../../../components/base-path-link'; import { Icons } from '@ui/components/icons'; import { Button } from '@ui/components'; diff --git a/apps/blog/features/layouts/user-profile/list-item.tsx b/apps/blog/features/layouts/user-profile/list-item.tsx index ba8393082..4e9e39dc5 100644 --- a/apps/blog/features/layouts/user-profile/list-item.tsx +++ b/apps/blog/features/layouts/user-profile/list-item.tsx @@ -1,7 +1,7 @@ 'use client'; import clsx from 'clsx'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const ListItem = ({ href, currentTab, label }: { href: string; currentTab: boolean; label: string }) => { return ( diff --git a/apps/blog/features/layouts/user-profile/profile-layout.tsx b/apps/blog/features/layouts/user-profile/profile-layout.tsx index 2457fd611..6fb3fc566 100644 --- a/apps/blog/features/layouts/user-profile/profile-layout.tsx +++ b/apps/blog/features/layouts/user-profile/profile-layout.tsx @@ -1,7 +1,7 @@ 'use client'; import React, { ReactNode, useEffect, useState } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import clsx from 'clsx'; import BasePathLink from '@/blog/components/base-path-link'; import { useQuery } from '@tanstack/react-query'; diff --git a/apps/blog/features/list-of-posts/payout-hover-content.tsx b/apps/blog/features/list-of-posts/payout-hover-content.tsx index b5cfc4650..e15ae7fbc 100644 --- a/apps/blog/features/list-of-posts/payout-hover-content.tsx +++ b/apps/blog/features/list-of-posts/payout-hover-content.tsx @@ -1,7 +1,7 @@ 'use client'; import { dateToRelative } from '@ui/lib/parse-date'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { amt, fmt } from '@/blog/lib/utils'; import { useQuery } from '@tanstack/react-query'; import Big from 'big.js'; diff --git a/apps/blog/features/list-of-posts/post-card-comment-tooltip.tsx b/apps/blog/features/list-of-posts/post-card-comment-tooltip.tsx index ad7d94364..d891b2088 100644 --- a/apps/blog/features/list-of-posts/post-card-comment-tooltip.tsx +++ b/apps/blog/features/list-of-posts/post-card-comment-tooltip.tsx @@ -3,7 +3,7 @@ import { Icons } from '@ui/components/icons'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@ui/components/tooltip'; import { useTranslation } from '@/blog/i18n/client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; interface PostCardCommentTooltipProps { comments: number; diff --git a/apps/blog/features/list-of-posts/post-card-hidden.tsx b/apps/blog/features/list-of-posts/post-card-hidden.tsx index 0278699e7..33c4fa9f7 100644 --- a/apps/blog/features/list-of-posts/post-card-hidden.tsx +++ b/apps/blog/features/list-of-posts/post-card-hidden.tsx @@ -1,6 +1,6 @@ import { User } from '@smart-signer/types/common'; import { Badge } from '@ui/components'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useEffect, useState } from 'react'; interface PostCardHiddenProps { diff --git a/apps/blog/features/list-of-posts/post-img.tsx b/apps/blog/features/list-of-posts/post-img.tsx index 3030f1ccc..102b32eed 100644 --- a/apps/blog/features/list-of-posts/post-img.tsx +++ b/apps/blog/features/list-of-posts/post-img.tsx @@ -2,7 +2,7 @@ import { useEffect, useState } from 'react'; import clsx from 'clsx'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { proxifyImageUrl } from '@ui/lib/old-profixy'; import { getDefaultImageUrl, getUserAvatarUrl } from '@ui/lib/avatar-utils'; import { customEndsWith } from '@/blog/lib/ends-with'; diff --git a/apps/blog/features/list-of-posts/post-list-item.tsx b/apps/blog/features/list-of-posts/post-list-item.tsx index c8d06715d..0155a3c3f 100644 --- a/apps/blog/features/list-of-posts/post-list-item.tsx +++ b/apps/blog/features/list-of-posts/post-list-item.tsx @@ -1,7 +1,7 @@ 'use client'; import { useEffect, useState } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@ui/components/tooltip'; import { Card, CardFooter, CardHeader } from '@ui/components/card'; import { Icons } from '@ui/components/icons'; diff --git a/apps/blog/features/list-of-posts/summary.tsx b/apps/blog/features/list-of-posts/summary.tsx index b7fbef06f..a6c906d34 100644 --- a/apps/blog/features/list-of-posts/summary.tsx +++ b/apps/blog/features/list-of-posts/summary.tsx @@ -8,7 +8,7 @@ import { Badge } from '@ui/components/badge'; import { CardContent, CardDescription, CardTitle } from '@ui/components/card'; import { Separator } from '@ui/components/separator'; import { useTranslation } from '@/blog/i18n/client'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const PostSummary = ({ post, diff --git a/apps/blog/features/post-editor/advanced-settings-post-form.tsx b/apps/blog/features/post-editor/advanced-settings-post-form.tsx index e5b5e10a2..95deb64bf 100644 --- a/apps/blog/features/post-editor/advanced-settings-post-form.tsx +++ b/apps/blog/features/post-editor/advanced-settings-post-form.tsx @@ -11,7 +11,7 @@ import { DialogTrigger } from '@ui/components/dialog'; import { ReactNode, useEffect, useState } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Icons } from '@ui/components/icons'; import { useLocalStorage } from 'usehooks-ts'; import { toast } from '@ui/components/hooks/use-toast'; diff --git a/apps/blog/features/post-editor/post-form.tsx b/apps/blog/features/post-editor/post-form.tsx index 37399fbe6..9c07b9db9 100644 --- a/apps/blog/features/post-editor/post-form.tsx +++ b/apps/blog/features/post-editor/post-form.tsx @@ -1,7 +1,7 @@ 'use client'; import { Dispatch, SetStateAction, useEffect, useRef, useState } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import clsx from 'clsx'; import * as z from 'zod'; import { Button } from '@hive/ui/components/button'; diff --git a/apps/blog/features/post-editor/reply-textbox.tsx b/apps/blog/features/post-editor/reply-textbox.tsx index ac646b37f..510aee898 100644 --- a/apps/blog/features/post-editor/reply-textbox.tsx +++ b/apps/blog/features/post-editor/reply-textbox.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Button } from '@ui/components/button'; import { useEffect, useState, useRef } from 'react'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/features/post-rendering/comment-list-item.tsx b/apps/blog/features/post-rendering/comment-list-item.tsx index ac02bcb7b..eab3ef85a 100644 --- a/apps/blog/features/post-rendering/comment-list-item.tsx +++ b/apps/blog/features/post-rendering/comment-list-item.tsx @@ -4,7 +4,7 @@ import { Icons } from '@hive/ui/components/icons'; import parseDate from '@hive/ui/lib/parse-date'; import { Card, CardContent, CardDescription, CardFooter, CardHeader } from '@hive/ui/components/card'; import { cn } from '@hive/ui/lib/utils'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Separator } from '@ui/components/separator'; import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@ui/components/accordion'; import { useEffect, useRef, useState, type ReactNode } from 'react'; diff --git a/apps/blog/features/post-rendering/context-links.tsx b/apps/blog/features/post-rendering/context-links.tsx index c807da79a..976ace49f 100644 --- a/apps/blog/features/post-rendering/context-links.tsx +++ b/apps/blog/features/post-rendering/context-links.tsx @@ -1,6 +1,6 @@ import { useTranslation } from '@/blog/i18n/client'; import { Entry } from '@transaction/lib/extended-hive.chain'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; const ContentLinks = ({ data, noContext }: { data: Entry; noContext: boolean }) => { const { t } = useTranslation('common_blog'); diff --git a/apps/blog/features/post-rendering/leave-page-dialog.tsx b/apps/blog/features/post-rendering/leave-page-dialog.tsx index 9cf6250d3..69a4d1245 100644 --- a/apps/blog/features/post-rendering/leave-page-dialog.tsx +++ b/apps/blog/features/post-rendering/leave-page-dialog.tsx @@ -1,6 +1,6 @@ import { Dialog, DialogContent } from '@ui/components/dialog'; import { Button, Separator } from '@ui/components'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useTranslation } from '@/blog/i18n/client'; export function LeavePageDialog({ diff --git a/apps/blog/features/post-rendering/share-post-dialog.tsx b/apps/blog/features/post-rendering/share-post-dialog.tsx index 85f3e6c41..6a302a726 100644 --- a/apps/blog/features/post-rendering/share-post-dialog.tsx +++ b/apps/blog/features/post-rendering/share-post-dialog.tsx @@ -1,6 +1,6 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogTrigger } from '@ui/components/dialog'; import { ReactNode } from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import ClipboardCopy from './copy-from-input'; import { Icons } from '@ui/components/icons'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/features/post-rendering/user-info.tsx b/apps/blog/features/post-rendering/user-info.tsx index a32d41185..ef4c08e76 100644 --- a/apps/blog/features/post-rendering/user-info.tsx +++ b/apps/blog/features/post-rendering/user-info.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import parseDate from '@ui/lib/parse-date'; import { Badge } from '@ui/components/badge'; import { useTranslation } from '@/blog/i18n/client'; diff --git a/apps/blog/features/search/account-topic-result.tsx b/apps/blog/features/search/account-topic-result.tsx index 145416c42..30878b415 100644 --- a/apps/blog/features/search/account-topic-result.tsx +++ b/apps/blog/features/search/account-topic-result.tsx @@ -6,7 +6,7 @@ import { useInView } from 'react-intersection-observer'; import { useUserClient } from '@smart-signer/lib/auth/use-user-client'; import Loading from '@ui/components/loading'; import { getByText } from '@transaction/lib/hive-api'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Activity } from 'lucide-react'; import { Preferences } from '@transaction/lib/app-types'; import PostCardSkeleton from '@hive/ui/components/card-skeleton'; diff --git a/apps/blog/features/suggestions-posts/card.tsx b/apps/blog/features/suggestions-posts/card.tsx index 8eb06df46..ca5c06845 100644 --- a/apps/blog/features/suggestions-posts/card.tsx +++ b/apps/blog/features/suggestions-posts/card.tsx @@ -1,6 +1,6 @@ import { Entry } from '@transaction/lib/extended-hive.chain'; import { find_first_img } from '../list-of-posts/post-img'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { proxifyImageUrl } from '@ui/lib/old-profixy'; import { useState } from 'react'; import { getDefaultImageUrl } from '@hive/ui'; diff --git a/apps/wallet/components/authorities-group-item.tsx b/apps/wallet/components/authorities-group-item.tsx index 975a86354..7b738c63e 100644 --- a/apps/wallet/components/authorities-group-item.tsx +++ b/apps/wallet/components/authorities-group-item.tsx @@ -4,7 +4,7 @@ import { FileKey, Trash, UserSquare } from 'lucide-react'; import { cutPublicKey } from '@/wallet/lib/utils'; import CopyToKeyboard from '@/wallet/components/copy-to-keyboard'; import { Input } from '@ui/components'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import ButtonTooltip from './button-tooltip'; import NumberInput from './number-input'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/components/common/profile-layout.tsx b/apps/wallet/components/common/profile-layout.tsx index b3c862928..9ced7a9db 100644 --- a/apps/wallet/components/common/profile-layout.tsx +++ b/apps/wallet/components/common/profile-layout.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useRouter } from 'next/router'; import { useSiteParams } from '@ui/components/hooks/use-site-params'; import Loading from '@ui/components/loading'; diff --git a/apps/wallet/components/main-nav.tsx b/apps/wallet/components/main-nav.tsx index 0c1bbbc1f..157a6dea9 100644 --- a/apps/wallet/components/main-nav.tsx +++ b/apps/wallet/components/main-nav.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { usePathname } from 'next/navigation'; import { cn } from '@ui/lib/utils'; diff --git a/apps/wallet/components/mobile-nav.tsx b/apps/wallet/components/mobile-nav.tsx index ad87d1402..f8b546e34 100644 --- a/apps/wallet/components/mobile-nav.tsx +++ b/apps/wallet/components/mobile-nav.tsx @@ -1,7 +1,7 @@ 'use client'; import * as React from 'react'; -import Link, { LinkProps } from 'next/link'; +import { Link, LinkProps } from '@hive/ui'; import { useRouter } from 'next/navigation'; import { SidebarOpen } from 'lucide-react'; import { siteConfig } from '@ui/config/site'; diff --git a/apps/wallet/components/proposals-list-item.tsx b/apps/wallet/components/proposals-list-item.tsx index eaa7f95ce..789df4dfe 100644 --- a/apps/wallet/components/proposals-list-item.tsx +++ b/apps/wallet/components/proposals-list-item.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { BURN_ACCOUNTS, REFUND_ACCOUNTS } from '@/wallet/lib/constants'; import { IListItemProps } from '@/wallet/lib/hive'; import { cn, getRoundedAbbreveration, numberWithCommas } from '@hive/ui/lib/utils'; diff --git a/apps/wallet/components/sidebar.tsx b/apps/wallet/components/sidebar.tsx index fadad2b02..357a5ea08 100644 --- a/apps/wallet/components/sidebar.tsx +++ b/apps/wallet/components/sidebar.tsx @@ -1,7 +1,7 @@ import { Button } from '@ui/components/button'; import { Icons } from '@ui/components/icons'; import { Sheet, SheetContent, SheetTrigger, SheetClose } from '@ui/components/sheet'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Separator } from '@ui/components/separator'; import clsx from 'clsx'; import { ReactNode } from 'react'; diff --git a/apps/wallet/components/site-header.tsx b/apps/wallet/components/site-header.tsx index 658e5f135..067166277 100644 --- a/apps/wallet/components/site-header.tsx +++ b/apps/wallet/components/site-header.tsx @@ -3,7 +3,7 @@ import { Icons } from '@ui/components/icons'; import { FC, useState, useEffect } from 'react'; import Sidebar from './sidebar'; import ModeToggle from './mode-toggle'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import DialogLogin from './dialog-login'; import LangToggle from '@/wallet/components/lang-toggle'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/components/user-menu.tsx b/apps/wallet/components/user-menu.tsx index 96f37c947..c8f97ed95 100644 --- a/apps/wallet/components/user-menu.tsx +++ b/apps/wallet/components/user-menu.tsx @@ -9,7 +9,7 @@ import { } from '@ui/components/dropdown-menu'; import { ReactNode } from 'react'; import ModeToggle from './mode-toggle'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { Icons } from '@ui/components/icons'; import { Button } from '@ui/components'; import LangToggle from './lang-toggle'; diff --git a/apps/wallet/components/voters-item.tsx b/apps/wallet/components/voters-item.tsx index 11248f2ae..05477a594 100644 --- a/apps/wallet/components/voters-item.tsx +++ b/apps/wallet/components/voters-item.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; function VotersItem({ username, hp, proxy }: { username: string; hp: number; proxy: number }) { return ( diff --git a/apps/wallet/components/wallet-menu.tsx b/apps/wallet/components/wallet-menu.tsx index 6d25f14ee..31647fd15 100644 --- a/apps/wallet/components/wallet-menu.tsx +++ b/apps/wallet/components/wallet-menu.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import clsx from 'clsx'; import { useRouter } from 'next/router'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/components/witness-vote-expiry-warning.tsx b/apps/wallet/components/witness-vote-expiry-warning.tsx index 8cbac3998..cbf220511 100644 --- a/apps/wallet/components/witness-vote-expiry-warning.tsx +++ b/apps/wallet/components/witness-vote-expiry-warning.tsx @@ -1,6 +1,6 @@ import moment from 'moment'; import { useTranslation } from 'next-i18next'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import HoverClickTooltip from './hover-click-tooltip'; const HIVE_NULL_DATE = 2016; // The year when the Hive blockchain was created diff --git a/apps/wallet/components/witnesses-list-item.tsx b/apps/wallet/components/witnesses-list-item.tsx index 76cf12e02..c23adc566 100644 --- a/apps/wallet/components/witnesses-list-item.tsx +++ b/apps/wallet/components/witnesses-list-item.tsx @@ -1,4 +1,4 @@ -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { ExtendWitness } from '@/wallet/pages/~witnesses'; import clsx from 'clsx'; import { DISABLED_SIGNING_KEY } from '@/wallet/lib/constants'; diff --git a/apps/wallet/feature/delegations/rc-row.tsx b/apps/wallet/feature/delegations/rc-row.tsx index e335f33cd..f0e4ad307 100644 --- a/apps/wallet/feature/delegations/rc-row.tsx +++ b/apps/wallet/feature/delegations/rc-row.tsx @@ -1,5 +1,5 @@ import { prepareRC } from '@/wallet/lib/utils'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useUndelegateMutation } from './hooks/use-undelegate-mutation'; import { Button } from '@ui/components'; import { CircleSpinner } from 'react-spinners-kit'; diff --git a/apps/wallet/pages/404.tsx b/apps/wallet/pages/404.tsx index 58edf10c4..ba3dc12f1 100644 --- a/apps/wallet/pages/404.tsx +++ b/apps/wallet/pages/404.tsx @@ -1,6 +1,6 @@ import { Icons } from '@ui/components/icons'; import { GetStaticProps } from 'next'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { serverSideTranslations } from 'next-i18next/serverSideTranslations'; import { i18n } from '@/wallet/next-i18next.config'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/pages/[param]/author-rewards.tsx b/apps/wallet/pages/[param]/author-rewards.tsx index 4eeb63429..d0908ade7 100644 --- a/apps/wallet/pages/[param]/author-rewards.tsx +++ b/apps/wallet/pages/[param]/author-rewards.tsx @@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next'; import { getAccountMetadata, getTranslations } from '@/wallet/lib/get-translations'; import Head from 'next/head'; import { useRewardsHistory } from '@/wallet/components/hooks/use-rewards-history'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import env from '@beam-australia/react-env'; import { convertStringToBig } from '@ui/lib/helpers'; import { convertToHP } from '@ui/lib/utils'; diff --git a/apps/wallet/pages/[param]/communities.tsx b/apps/wallet/pages/[param]/communities.tsx index 76e01d1cf..f5f49c36d 100644 --- a/apps/wallet/pages/[param]/communities.tsx +++ b/apps/wallet/pages/[param]/communities.tsx @@ -31,7 +31,7 @@ import { handleError } from '@ui/lib/handle-error'; import { useQuery } from '@tanstack/react-query'; import { useUser } from '@smart-signer/lib/auth/use-user'; import Loading from '@ui/components/loading'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import env from '@beam-australia/react-env'; import { getFindAccounts } from '@transaction/lib/hive-api'; import { getAccount } from '@transaction/lib/hive-api'; diff --git a/apps/wallet/pages/[param]/curation-rewards.tsx b/apps/wallet/pages/[param]/curation-rewards.tsx index 2ce5b4965..50bf71b9f 100644 --- a/apps/wallet/pages/[param]/curation-rewards.tsx +++ b/apps/wallet/pages/[param]/curation-rewards.tsx @@ -5,7 +5,7 @@ import { getAccountMetadata, getTranslations } from '@/wallet/lib/get-translatio import Head from 'next/head'; import { useRewardsHistory } from '@/wallet/components/hooks/use-rewards-history'; import Loading from '@ui/components/loading'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { convertToHP } from '@ui/lib/utils'; import { convertStringToBig } from '@ui/lib/helpers'; import env from '@beam-australia/react-env'; diff --git a/apps/wallet/pages/[param]/password.tsx b/apps/wallet/pages/[param]/password.tsx index cae63574d..b0e5b5c37 100644 --- a/apps/wallet/pages/[param]/password.tsx +++ b/apps/wallet/pages/[param]/password.tsx @@ -5,7 +5,7 @@ import * as z from 'zod'; import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from '@ui/components/form'; import { useForm } from 'react-hook-form'; import { Checkbox, Separator } from '@hive/ui'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { useEffect, useMemo, useState } from 'react'; import { GetServerSideProps } from 'next'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/pages/[param]/permissions.tsx b/apps/wallet/pages/[param]/permissions.tsx index f69ecd2ec..0aa520997 100644 --- a/apps/wallet/pages/[param]/permissions.tsx +++ b/apps/wallet/pages/[param]/permissions.tsx @@ -2,7 +2,7 @@ import { GetServerSideProps, InferGetServerSidePropsType } from 'next'; import ProfileLayout from '@/wallet/components/common/profile-layout'; import WalletMenu from '@/wallet/components/wallet-menu'; import { Card, Separator } from '@ui/components'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import { cn } from '@ui/lib/utils'; import { getAccountMetadata, getTranslations } from '@/wallet/lib/get-translations'; import { useTranslation } from 'next-i18next'; diff --git a/apps/wallet/pages/[param]/transfers.tsx b/apps/wallet/pages/[param]/transfers.tsx index f8bbe83e6..e17b9e13a 100644 --- a/apps/wallet/pages/[param]/transfers.tsx +++ b/apps/wallet/pages/[param]/transfers.tsx @@ -20,7 +20,7 @@ import { powerdownHive, cn, convertToHP, numberWithCommas } from '@ui/lib/utils' import { convertStringToBig } from '@ui/lib/helpers'; import { HiveOperation } from '@transaction/lib/extended-hive.chain'; import { GetServerSideProps, InferGetServerSidePropsType } from 'next'; -import Link from 'next/link'; +import { Link } from '@hive/ui'; import Loading from '@ui/components/loading'; import TransfersHistoryFilter from '@/wallet/components/transfers-history-filter'; import ProfileLayout from '@/wallet/components/common/profile-layout'; diff --git a/packages/eslint-config-custom/index.js b/packages/eslint-config-custom/index.js index 28c6b4a97..1cd25321e 100644 --- a/packages/eslint-config-custom/index.js +++ b/packages/eslint-config-custom/index.js @@ -14,7 +14,20 @@ module.exports = { 'react/react-in-jsx-scope': 'off', 'react/prop-types': 'off', 'react-hooks/rules-of-hooks': 'error', - 'react-hooks/exhaustive-deps': 'warn' + 'react-hooks/exhaustive-deps': 'warn', + 'turbo/no-undeclared-env-vars': 'off', + 'no-restricted-imports': [ + 'error', + { + paths: [ + { + name: 'next/link', + message: + 'Use { Link } from "@hive/ui" instead for prefetch={false} by default' + } + ] + } + ] }, env: { browser: true, diff --git a/packages/ui/components/index.tsx b/packages/ui/components/index.tsx index 32d7d4468..895f299e8 100644 --- a/packages/ui/components/index.tsx +++ b/packages/ui/components/index.tsx @@ -33,6 +33,7 @@ export * from "./toast"; export * from "./toaster"; export * from "./toggle"; export * from "./tooltip"; +export * from "./link"; // utility exports export * from "../lib/avatar-utils"; diff --git a/packages/ui/components/link.tsx b/packages/ui/components/link.tsx new file mode 100644 index 000000000..6732a50d2 --- /dev/null +++ b/packages/ui/components/link.tsx @@ -0,0 +1,20 @@ +import NextLink, { LinkProps as NextLinkProps } from 'next/link'; +import { AnchorHTMLAttributes, forwardRef } from 'react'; + +export interface LinkProps + extends NextLinkProps, + Omit, keyof NextLinkProps> { + children?: React.ReactNode; +} + +/** + * Custom Link component that wraps Next.js Link with prefetch disabled by default. + * This prevents excessive server-side API calls from automatic prefetching. + * + * Use prefetch={true} explicitly when you need prefetching for specific links. + */ +export const Link = forwardRef( + ({ prefetch = false, ...props }, ref) => +); + +Link.displayName = 'Link'; -- GitLab From e69208e043aa81349871335e415d21cb2e0ad48d Mon Sep 17 00:00:00 2001 From: Krzysztof Kocot Date: Mon, 15 Dec 2025 13:45:39 +0100 Subject: [PATCH 2/3] Skip community API calls for non-community tags MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Only fetch community data (getCommunity, getSubscribers, getAccountNotifications) when the tag parameter starts with 'hive-' prefix, as regular tags are not communities and these API calls would fail. Fixes #768 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../blog/app/[param]/[p2]/[permlink]/page.tsx | 2 +- .../features/community-profile/sort-page.tsx | 26 ++++++++++--------- apps/blog/lib/get-metadata.ts | 2 +- 3 files changed, 16 insertions(+), 14 deletions(-) diff --git a/apps/blog/app/[param]/[p2]/[permlink]/page.tsx b/apps/blog/app/[param]/[p2]/[permlink]/page.tsx index 79756c563..a4558d640 100644 --- a/apps/blog/app/[param]/[p2]/[permlink]/page.tsx +++ b/apps/blog/app/[param]/[p2]/[permlink]/page.tsx @@ -44,7 +44,7 @@ const PostPage = async ({ if (community.startsWith('hive-')) { await queryClient.prefetchQuery({ - queryKey: ['communityData', community], + queryKey: ['community', community], queryFn: () => getCommunity(community, observer) }); await queryClient.prefetchQuery({ diff --git a/apps/blog/features/community-profile/sort-page.tsx b/apps/blog/features/community-profile/sort-page.tsx index e02aa6917..cc05ece49 100644 --- a/apps/blog/features/community-profile/sort-page.tsx +++ b/apps/blog/features/community-profile/sort-page.tsx @@ -26,18 +26,20 @@ const SortPage = async ({ const queryClient = getQueryClient(); try { const observer = getObserverFromCookies(); - await queryClient.prefetchQuery({ - queryKey: ['community', tag], - queryFn: async () => await getCommunity(tag, observer) - }); - await queryClient.prefetchQuery({ - queryKey: ['subscribers', tag], - queryFn: async () => await getSubscribers(tag) - }); - await queryClient.prefetchQuery({ - queryKey: ['AccountNotification', tag], - queryFn: async () => await getAccountNotifications(tag) - }); + if (tag.startsWith('hive-')) { + await queryClient.prefetchQuery({ + queryKey: ['community', tag], + queryFn: async () => await getCommunity(tag, observer) + }); + await queryClient.prefetchQuery({ + queryKey: ['subscribers', tag], + queryFn: async () => await getSubscribers(tag) + }); + await queryClient.prefetchQuery({ + queryKey: ['AccountNotification', tag], + queryFn: async () => await getAccountNotifications(tag) + }); + } await queryClient.prefetchInfiniteQuery({ queryKey: ['entriesInfinite', sort, tag], queryFn: async ({ pageParam }) => { diff --git a/apps/blog/lib/get-metadata.ts b/apps/blog/lib/get-metadata.ts index a60592073..8e4309d60 100644 --- a/apps/blog/lib/get-metadata.ts +++ b/apps/blog/lib/get-metadata.ts @@ -52,7 +52,7 @@ export const getCommunityMetadata = async ( }; try { - if (secondParam === '') { + if (secondParam === '' || !secondParam.startsWith('hive-')) { const defaultMetadata = { tabTitle: '', description: '', -- GitLab From 114354824cec045fcb208677deb28d776c2e3a4e Mon Sep 17 00:00:00 2001 From: Krzysztof Kocot Date: Mon, 15 Dec 2025 14:01:44 +0100 Subject: [PATCH 3/3] Remove redundant prefetch={false} from Link components MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The global Link wrapper now has prefetch disabled by default, so these explicit prefetch={false} props are no longer needed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../features/list-of-posts/post-list-item.tsx | 15 +++------------ apps/blog/features/list-of-posts/summary.tsx | 3 +-- apps/blog/features/post-rendering/user-info.tsx | 2 +- apps/blog/features/suggestions-posts/card.tsx | 4 ++-- 4 files changed, 7 insertions(+), 17 deletions(-) diff --git a/apps/blog/features/list-of-posts/post-list-item.tsx b/apps/blog/features/list-of-posts/post-list-item.tsx index 0155a3c3f..a1d03293c 100644 --- a/apps/blog/features/list-of-posts/post-list-item.tsx +++ b/apps/blog/features/list-of-posts/post-list-item.tsx @@ -62,18 +62,13 @@ const PostListItem = ({

{' '} - + {post.author} {' '} cross-posted{' '} @{post.original_entry.author}/{post.original_entry.permlink} @@ -88,7 +83,6 @@ const PostListItem = ({ href={`/@${post.reblogged_by[0]}`} className="cursor-pointer hover:text-destructive" data-testid="reblogged-author-link" - prefetch={false} > {post.reblogged_by[0]} {' '} @@ -99,7 +93,7 @@ const PostListItem = ({

{nsfw === 'show' && post.blacklists.length < 1 ? ( - +
{post.author} {' '} @@ -161,7 +154,6 @@ const PostListItem = ({ href={`/${post.category}/@${post.author}/${post.permlink}`} className="hover:cursor-pointer hover:text-destructive" data-testid="post-card-timestamp" - prefetch={false} > @@ -170,7 +162,7 @@ const PostListItem = ({ - + @@ -186,7 +178,6 @@ const PostListItem = ({ {t('cards.badges.pinned')} diff --git a/apps/blog/features/list-of-posts/summary.tsx b/apps/blog/features/list-of-posts/summary.tsx index a6c906d34..735ced3bd 100644 --- a/apps/blog/features/list-of-posts/summary.tsx +++ b/apps/blog/features/list-of-posts/summary.tsx @@ -39,13 +39,12 @@ const PostSummary = ({ {post.title} - + {userFromDMCA ? t('cards.content_removed') : legalBlockedUser diff --git a/apps/blog/features/post-rendering/user-info.tsx b/apps/blog/features/post-rendering/user-info.tsx index ef4c08e76..a1988525a 100644 --- a/apps/blog/features/post-rendering/user-info.tsx +++ b/apps/blog/features/post-rendering/user-info.tsx @@ -92,7 +92,7 @@ function UserInfo({ {authored ? ( Authored by{' '} - + @{authored} diff --git a/apps/blog/features/suggestions-posts/card.tsx b/apps/blog/features/suggestions-posts/card.tsx index ca5c06845..73f22dadd 100644 --- a/apps/blog/features/suggestions-posts/card.tsx +++ b/apps/blog/features/suggestions-posts/card.tsx @@ -14,7 +14,7 @@ const SuggestionsCard = ({ entry }: { entry: Entry }) => { const [image, setImage] = useState(cardImage); return (
- + <> {image ? (
@@ -38,7 +38,7 @@ const SuggestionsCard = ({ entry }: { entry: Entry }) => {

{truncateTitle(entry.title)}

- {entry.author} + {entry.author}
-- GitLab