Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
frontend
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
vicotor
frontend
Commits
0f9b5e74
Unverified
Commit
0f9b5e74
authored
Feb 04, 2025
by
Igor Stuev
Committed by
GitHub
Feb 04, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove nextjs link prefetch (#2537)
parent
64d1f392
Changes
13
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
35 additions
and
11 deletions
+35
-11
eslint.config.mjs
eslint.config.mjs
+5
-0
TokenSelect.tsx
ui/address/tokenSelect/TokenSelect.tsx
+1
-1
FeaturedApp.tsx
ui/marketplace/Banner/FeaturedApp.tsx
+1
-1
MarketplaceAppCardLink.tsx
ui/marketplace/MarketplaceAppCardLink.tsx
+2
-1
MarketplaceAppModalLink.tsx
ui/marketplace/MarketplaceAppModalLink.tsx
+2
-1
MarketplaceDisclaimerModal.tsx
ui/marketplace/MarketplaceDisclaimerModal.tsx
+1
-1
NextLink.tsx
ui/shared/NextLink.tsx
+15
-0
ChartWidget.tsx
ui/shared/chart/ChartWidget.tsx
+1
-1
LinkInternal.tsx
ui/shared/links/LinkInternal.tsx
+2
-1
StatsWidget.tsx
ui/shared/stats/StatsWidget.tsx
+1
-1
NavLink.tsx
ui/snippets/navigation/vertical/NavLink.tsx
+1
-1
SearchBarSuggestApp.tsx
...ippets/searchBar/SearchBarSuggest/SearchBarSuggestApp.tsx
+1
-1
SearchBarSuggestItem.tsx
...ppets/searchBar/SearchBarSuggest/SearchBarSuggestItem.tsx
+2
-1
No files found.
eslint.config.mjs
View file @
0f9b5e74
...
@@ -30,6 +30,11 @@ const RESTRICTED_MODULES = {
...
@@ -30,6 +30,11 @@ const RESTRICTED_MODULES = {
importNames
:
[
'
Popover
'
,
'
Menu
'
,
'
PinInput
'
,
'
useToast
'
,
'
Skeleton
'
],
importNames
:
[
'
Popover
'
,
'
Menu
'
,
'
PinInput
'
,
'
useToast
'
,
'
Skeleton
'
],
message
:
'
Please use corresponding component or hook from ui/shared/chakra component instead
'
,
message
:
'
Please use corresponding component or hook from ui/shared/chakra component instead
'
,
},
},
{
name
:
'
next/link
'
,
importNames
:
[
'
default
'
],
message
:
'
Please use ui/shared/NextLink component instead
'
,
},
],
],
patterns
:
[
patterns
:
[
'
icons/*
'
,
'
icons/*
'
,
...
...
ui/address/tokenSelect/TokenSelect.tsx
View file @
0f9b5e74
import
{
Box
,
Flex
,
IconButton
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
IconButton
,
Tooltip
}
from
'
@chakra-ui/react
'
;
import
{
useQueryClient
,
useIsFetching
}
from
'
@tanstack/react-query
'
;
import
{
useQueryClient
,
useIsFetching
}
from
'
@tanstack/react-query
'
;
import
{
sumBy
}
from
'
es-toolkit
'
;
import
{
sumBy
}
from
'
es-toolkit
'
;
import
NextLink
from
'
next/link
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
...
@@ -13,6 +12,7 @@ import * as mixpanel from 'lib/mixpanel/index';
...
@@ -13,6 +12,7 @@ import * as mixpanel from 'lib/mixpanel/index';
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
useFetchTokens
from
'
../utils/useFetchTokens
'
;
import
useFetchTokens
from
'
../utils/useFetchTokens
'
;
import
TokenSelectDesktop
from
'
./TokenSelectDesktop
'
;
import
TokenSelectDesktop
from
'
./TokenSelectDesktop
'
;
...
...
ui/marketplace/Banner/FeaturedApp.tsx
View file @
0f9b5e74
import
{
Link
,
useColorModeValue
,
LinkBox
,
Flex
,
Image
,
LinkOverlay
,
IconButton
}
from
'
@chakra-ui/react
'
;
import
{
Link
,
useColorModeValue
,
LinkBox
,
Flex
,
Image
,
LinkOverlay
,
IconButton
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
type
{
MouseEvent
}
from
'
react
'
;
import
type
{
MouseEvent
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
...
@@ -8,6 +7,7 @@ import type { MarketplaceAppPreview } from 'types/client/marketplace';
...
@@ -8,6 +7,7 @@ import type { MarketplaceAppPreview } from 'types/client/marketplace';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
*
as
mixpanel
from
'
lib/mixpanel/index
'
;
import
*
as
mixpanel
from
'
lib/mixpanel/index
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
FavoriteIcon
from
'
../FavoriteIcon
'
;
import
FavoriteIcon
from
'
../FavoriteIcon
'
;
import
MarketplaceAppIntegrationIcon
from
'
../MarketplaceAppIntegrationIcon
'
;
import
MarketplaceAppIntegrationIcon
from
'
../MarketplaceAppIntegrationIcon
'
;
...
...
ui/marketplace/MarketplaceAppCardLink.tsx
View file @
0f9b5e74
import
{
LinkOverlay
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
LinkOverlay
,
chakra
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
MouseEvent
}
from
'
react
'
;
import
type
{
MouseEvent
}
from
'
react
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
type
Props
=
{
type
Props
=
{
id
:
string
;
id
:
string
;
url
:
string
;
url
:
string
;
...
...
ui/marketplace/MarketplaceAppModalLink.tsx
View file @
0f9b5e74
import
{
Button
}
from
'
@chakra-ui/react
'
;
import
{
Button
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
type
Props
=
{
type
Props
=
{
id
:
string
;
id
:
string
;
url
:
string
;
url
:
string
;
...
...
ui/marketplace/MarketplaceDisclaimerModal.tsx
View file @
0f9b5e74
import
{
Heading
,
Modal
,
ModalBody
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Text
,
Button
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Heading
,
Modal
,
ModalBody
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Text
,
Button
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
type
Props
=
{
type
Props
=
{
isOpen
:
boolean
;
isOpen
:
boolean
;
...
...
ui/shared/NextLink.tsx
0 → 100644
View file @
0f9b5e74
// eslint-disable-next-line no-restricted-imports
import
NextLink
,
{
type
LinkProps
as
NextLinkProps
}
from
'
next/link
'
;
import
type
{
ReactNode
}
from
'
react
'
;
type
LinkProps
=
NextLinkProps
&
{
children
?:
ReactNode
};
const
Link
=
({
prefetch
=
false
,
children
,
...
rest
}:
LinkProps
)
=>
{
return
(
<
NextLink
prefetch=
{
prefetch
}
{
...
rest
}
>
{
children
}
</
NextLink
>
);
};
export
default
Link
;
ui/shared/chart/ChartWidget.tsx
View file @
0f9b5e74
...
@@ -5,7 +5,6 @@ import {
...
@@ -5,7 +5,6 @@ import {
Tooltip
,
Tooltip
,
useColorModeValue
,
useColorModeValue
,
}
from
'
@chakra-ui/react
'
;
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
,
{
useRef
}
from
'
react
'
;
import
React
,
{
useRef
}
from
'
react
'
;
import
type
{
TimeChartItem
}
from
'
./types
'
;
import
type
{
TimeChartItem
}
from
'
./types
'
;
...
@@ -15,6 +14,7 @@ import { route, type Route } from 'nextjs-routes';
...
@@ -15,6 +14,7 @@ import { route, type Route } from 'nextjs-routes';
import
config
from
'
configs/app
'
;
import
config
from
'
configs/app
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
ChartMenu
from
'
./ChartMenu
'
;
import
ChartMenu
from
'
./ChartMenu
'
;
import
ChartWidgetContent
from
'
./ChartWidgetContent
'
;
import
ChartWidgetContent
from
'
./ChartWidgetContent
'
;
...
...
ui/shared/links/LinkInternal.tsx
View file @
0f9b5e74
import
type
{
LinkProps
,
FlexProps
}
from
'
@chakra-ui/react
'
;
import
type
{
LinkProps
,
FlexProps
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Link
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Link
}
from
'
@chakra-ui/react
'
;
import
type
{
LinkProps
as
NextLinkProps
}
from
'
next/link
'
;
import
type
{
LinkProps
as
NextLinkProps
}
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
import
type
{
LegacyRef
}
from
'
react
'
;
import
type
{
LegacyRef
}
from
'
react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
type
{
Variants
}
from
'
./useLinkStyles
'
;
import
type
{
Variants
}
from
'
./useLinkStyles
'
;
import
{
useLinkStyles
}
from
'
./useLinkStyles
'
;
import
{
useLinkStyles
}
from
'
./useLinkStyles
'
;
...
...
ui/shared/stats/StatsWidget.tsx
View file @
0f9b5e74
import
{
Box
,
Flex
,
Text
,
useColorModeValue
,
chakra
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
,
useColorModeValue
,
chakra
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
Route
}
from
'
nextjs-routes
'
;
import
type
{
Route
}
from
'
nextjs-routes
'
;
...
@@ -7,6 +6,7 @@ import type { Route } from 'nextjs-routes';
...
@@ -7,6 +6,7 @@ import type { Route } from 'nextjs-routes';
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
Skeleton
from
'
ui/shared/chakra/Skeleton
'
;
import
Hint
from
'
ui/shared/Hint
'
;
import
Hint
from
'
ui/shared/Hint
'
;
import
IconSvg
,
{
type
IconName
}
from
'
ui/shared/IconSvg
'
;
import
IconSvg
,
{
type
IconName
}
from
'
ui/shared/IconSvg
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
TruncatedValue
from
'
ui/shared/TruncatedValue
'
;
import
TruncatedValue
from
'
ui/shared/TruncatedValue
'
;
export
type
Props
=
{
export
type
Props
=
{
...
...
ui/snippets/navigation/vertical/NavLink.tsx
View file @
0f9b5e74
import
{
Link
,
Text
,
HStack
,
Tooltip
,
Box
,
useBreakpointValue
}
from
'
@chakra-ui/react
'
;
import
{
Link
,
Text
,
HStack
,
Tooltip
,
Box
,
useBreakpointValue
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
NavItem
}
from
'
types/client/navigation
'
;
import
type
{
NavItem
}
from
'
types/client/navigation
'
;
...
@@ -9,6 +8,7 @@ import { route } from 'nextjs-routes';
...
@@ -9,6 +8,7 @@ import { route } from 'nextjs-routes';
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
{
isInternalItem
}
from
'
lib/hooks/useNavItems
'
;
import
{
isInternalItem
}
from
'
lib/hooks/useNavItems
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
LightningLabel
,
{
LIGHTNING_LABEL_CLASS_NAME
}
from
'
../LightningLabel
'
;
import
LightningLabel
,
{
LIGHTNING_LABEL_CLASS_NAME
}
from
'
../LightningLabel
'
;
import
NavLinkIcon
from
'
../NavLinkIcon
'
;
import
NavLinkIcon
from
'
../NavLinkIcon
'
;
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestApp.tsx
View file @
0f9b5e74
import
{
Image
,
Flex
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Image
,
Flex
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
MarketplaceAppOverview
}
from
'
types/client/marketplace
'
;
import
type
{
MarketplaceAppOverview
}
from
'
types/client/marketplace
'
;
import
highlightText
from
'
lib/highlightText
'
;
import
highlightText
from
'
lib/highlightText
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
SearchBarSuggestItemLink
from
'
./SearchBarSuggestItemLink
'
;
import
SearchBarSuggestItemLink
from
'
./SearchBarSuggestItemLink
'
;
...
...
ui/snippets/searchBar/SearchBarSuggest/SearchBarSuggestItem.tsx
View file @
0f9b5e74
import
type
{
LinkProps
as
NextLinkProps
}
from
'
next/link
'
;
import
type
{
LinkProps
as
NextLinkProps
}
from
'
next/link
'
;
import
NextLink
from
'
next/link
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
SearchResultItem
}
from
'
types/client/search
'
;
import
type
{
SearchResultItem
}
from
'
types/client/search
'
;
...
@@ -7,6 +6,8 @@ import type { AddressFormat } from 'types/views/address';
...
@@ -7,6 +6,8 @@ import type { AddressFormat } from 'types/views/address';
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
NextLink
from
'
ui/shared/NextLink
'
;
import
SearchBarSuggestAddress
from
'
./SearchBarSuggestAddress
'
;
import
SearchBarSuggestAddress
from
'
./SearchBarSuggestAddress
'
;
import
SearchBarSuggestBlob
from
'
./SearchBarSuggestBlob
'
;
import
SearchBarSuggestBlob
from
'
./SearchBarSuggestBlob
'
;
import
SearchBarSuggestBlock
from
'
./SearchBarSuggestBlock
'
;
import
SearchBarSuggestBlock
from
'
./SearchBarSuggestBlock
'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment