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
d0230810
Commit
d0230810
authored
Feb 21, 2023
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move ad to sponsered group
parent
f92c2505
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
9 deletions
+37
-9
AddressDetails.tsx
ui/address/AddressDetails.tsx
+18
-1
Address.tsx
ui/pages/Address.tsx
+0
-2
Token.tsx
ui/pages/Token.tsx
+0
-2
TokenDetails.tsx
ui/token/TokenDetails.tsx
+18
-1
TxDetails.tsx
ui/tx/TxDetails.tsx
+1
-3
No files found.
ui/address/AddressDetails.tsx
View file @
d0230810
import
{
Box
,
Flex
,
Text
,
Icon
,
Grid
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Text
,
Icon
,
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
{
route
}
from
'
nextjs-routes
'
;
...
@@ -10,8 +10,10 @@ import appConfig from 'configs/app/config';
...
@@ -10,8 +10,10 @@ import appConfig from 'configs/app/config';
import
blockIcon
from
'
icons/block.svg
'
;
import
blockIcon
from
'
icons/block.svg
'
;
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
type
{
ResourceError
}
from
'
lib/api/resources
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
getQueryParamString
from
'
lib/router/getQueryParamString
'
;
import
AddressCounterItem
from
'
ui/address/details/AddressCounterItem
'
;
import
AddressCounterItem
from
'
ui/address/details/AddressCounterItem
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressHeadingInfo
from
'
ui/shared/AddressHeadingInfo
'
;
import
AddressHeadingInfo
from
'
ui/shared/AddressHeadingInfo
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
import
DataFetchAlert
from
'
ui/shared/DataFetchAlert
'
;
...
@@ -32,6 +34,7 @@ interface Props {
...
@@ -32,6 +34,7 @@ interface Props {
const
AddressDetails
=
({
addressQuery
,
scrollRef
}:
Props
)
=>
{
const
AddressDetails
=
({
addressQuery
,
scrollRef
}:
Props
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
isMobile
=
useIsMobile
();
const
addressHash
=
getQueryParamString
(
router
.
query
.
hash
);
const
addressHash
=
getQueryParamString
(
router
.
query
.
hash
);
...
@@ -193,6 +196,20 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
...
@@ -193,6 +196,20 @@ const AddressDetails = ({ addressQuery, scrollRef }: Props) => {
</
LinkInternal
>
</
LinkInternal
>
</
DetailsInfoItem
>
</
DetailsInfoItem
>
)
}
)
}
{
isMobile
?
(
<
GridItem
mt=
{
5
}
>
<
AdBanner
justifyContent=
"center"
/>
</
GridItem
>
)
:
(
<
DetailsInfoItem
title=
"Sponsored"
hint=
"Sponsored banner advertisement"
>
<
AdBanner
/>
</
DetailsInfoItem
>
)
}
</
Grid
>
</
Grid
>
</
Box
>
</
Box
>
);
);
...
...
ui/pages/Address.tsx
View file @
d0230810
...
@@ -20,7 +20,6 @@ import AddressLogs from 'ui/address/AddressLogs';
...
@@ -20,7 +20,6 @@ import AddressLogs from 'ui/address/AddressLogs';
import
AddressTokens
from
'
ui/address/AddressTokens
'
;
import
AddressTokens
from
'
ui/address/AddressTokens
'
;
import
AddressTokenTransfers
from
'
ui/address/AddressTokenTransfers
'
;
import
AddressTokenTransfers
from
'
ui/address/AddressTokenTransfers
'
;
import
AddressTxs
from
'
ui/address/AddressTxs
'
;
import
AddressTxs
from
'
ui/address/AddressTxs
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
...
@@ -114,7 +113,6 @@ const AddressPageContent = () => {
...
@@ -114,7 +113,6 @@ const AddressPageContent = () => {
/>
/>
)
}
)
}
<
AddressDetails
addressQuery=
{
addressQuery
}
scrollRef=
{
tabsScrollRef
}
/>
<
AddressDetails
addressQuery=
{
addressQuery
}
scrollRef=
{
tabsScrollRef
}
/>
<
AdBanner
mt=
{
{
base
:
6
,
lg
:
8
}
}
justifyContent=
"center"
/>
{
/* should stay before tabs to scroll up whith pagination */
}
{
/* should stay before tabs to scroll up whith pagination */
}
<
Box
ref=
{
tabsScrollRef
}
></
Box
>
<
Box
ref=
{
tabsScrollRef
}
></
Box
>
{
addressQuery
.
isLoading
?
<
SkeletonTabs
/>
:
content
}
{
addressQuery
.
isLoading
?
<
SkeletonTabs
/>
:
content
}
...
...
ui/pages/Token.tsx
View file @
d0230810
...
@@ -13,7 +13,6 @@ import useQueryWithPages from 'lib/hooks/useQueryWithPages';
...
@@ -13,7 +13,6 @@ import useQueryWithPages from 'lib/hooks/useQueryWithPages';
import
notEmpty
from
'
lib/notEmpty
'
;
import
notEmpty
from
'
lib/notEmpty
'
;
import
trimTokenSymbol
from
'
lib/token/trimTokenSymbol
'
;
import
trimTokenSymbol
from
'
lib/token/trimTokenSymbol
'
;
import
AddressContract
from
'
ui/address/AddressContract
'
;
import
AddressContract
from
'
ui/address/AddressContract
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
TextAd
from
'
ui/shared/ad/TextAd
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
Page
from
'
ui/shared/Page/Page
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
...
@@ -164,7 +163,6 @@ const TokenPageContent = () => {
...
@@ -164,7 +163,6 @@ const TokenPageContent = () => {
)
}
)
}
<
TokenContractInfo
tokenQuery=
{
tokenQuery
}
/>
<
TokenContractInfo
tokenQuery=
{
tokenQuery
}
/>
<
TokenDetails
tokenQuery=
{
tokenQuery
}
/>
<
TokenDetails
tokenQuery=
{
tokenQuery
}
/>
<
AdBanner
mt=
{
{
base
:
6
,
lg
:
8
}
}
justifyContent=
"center"
/>
{
/* should stay before tabs to scroll up whith pagination */
}
{
/* should stay before tabs to scroll up whith pagination */
}
<
Box
ref=
{
scrollRef
}
></
Box
>
<
Box
ref=
{
scrollRef
}
></
Box
>
...
...
ui/token/TokenDetails.tsx
View file @
d0230810
import
{
Grid
,
Link
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
Link
,
Skeleton
}
from
'
@chakra-ui/react
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
type
{
UseQueryResult
}
from
'
@tanstack/react-query
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
{
useRouter
}
from
'
next/router
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
...
@@ -8,7 +8,9 @@ import type { TokenInfo } from 'types/api/token';
...
@@ -8,7 +8,9 @@ import type { TokenInfo } from 'types/api/token';
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
useApiQuery
from
'
lib/api/useApiQuery
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
getCurrencyValue
from
'
lib/getCurrencyValue
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
type
{
TokenTabs
}
from
'
ui/pages/Token
'
;
import
type
{
TokenTabs
}
from
'
ui/pages/Token
'
;
import
AdBanner
from
'
ui/shared/ad/AdBanner
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
DetailsInfoItem
from
'
ui/shared/DetailsInfoItem
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
import
DetailsSkeletonRow
from
'
ui/shared/skeletons/DetailsSkeletonRow
'
;
...
@@ -18,6 +20,7 @@ interface Props {
...
@@ -18,6 +20,7 @@ interface Props {
const
TokenDetails
=
({
tokenQuery
}:
Props
)
=>
{
const
TokenDetails
=
({
tokenQuery
}:
Props
)
=>
{
const
router
=
useRouter
();
const
router
=
useRouter
();
const
isMobile
=
useIsMobile
();
const
tokenCountersQuery
=
useApiQuery
(
'
token_counters
'
,
{
const
tokenCountersQuery
=
useApiQuery
(
'
token_counters
'
,
{
pathParams
:
{
hash
:
router
.
query
.
hash
?.
toString
()
},
pathParams
:
{
hash
:
router
.
query
.
hash
?.
toString
()
},
...
@@ -135,6 +138,20 @@ const TokenDetails = ({ tokenQuery }: Props) => {
...
@@ -135,6 +138,20 @@ const TokenDetails = ({ tokenQuery }: Props) => {
{
decimals
}
{
decimals
}
</
DetailsInfoItem
>
</
DetailsInfoItem
>
)
}
)
}
{
isMobile
?
(
<
GridItem
mt=
{
5
}
>
<
AdBanner
justifyContent=
"center"
/>
</
GridItem
>
)
:
(
<
DetailsInfoItem
title=
"Sponsored"
hint=
"Sponsored banner advertisement"
>
<
AdBanner
/>
</
DetailsInfoItem
>
)
}
</
Grid
>
</
Grid
>
);
);
};
};
...
...
ui/tx/TxDetails.tsx
View file @
d0230810
...
@@ -179,9 +179,7 @@ const TxDetails = () => {
...
@@ -179,9 +179,7 @@ const TxDetails = () => {
)
}
)
}
{
isMobile
?
{
isMobile
?
(
(
<
GridItem
<
GridItem
>
colSpan=
{
{
base
:
undefined
,
lg
:
2
}
}
>
<
AdBanner
justifyContent=
"center"
/>
<
AdBanner
justifyContent=
"center"
/>
</
GridItem
>
</
GridItem
>
)
:
)
:
...
...
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