Skip to content

Commit

Permalink
Merge pull request #1831 from nervosnetwork/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith-CY authored Jan 3, 2025
2 parents 191d07c + b7b7f0c commit 17f3cf7
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 10 deletions.
15 changes: 12 additions & 3 deletions src/pages/Home/Banner/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useQuery } from '@tanstack/react-query'
import { BarChartIcon } from '@radix-ui/react-icons'
import { useTranslation } from 'react-i18next'
import { Tooltip } from 'antd'
import { Link } from '../../../components/Link'
import config from '../../../config'
import styles from './index.module.scss'
Expand Down Expand Up @@ -55,9 +56,17 @@ export default () => {
<Link to="https://www.ckbfiber.net/" target="_blank" rel="noopener noreferrer">
<span>{t(`banner.learn_more`)}</span>
</Link>
<Link to="/fiber/graph/nodes">
<span>{t('banner.find_nodes')}</span>
</Link>
<Tooltip title={t('banner.coming_soon')}>
<Link
to="/fiber/graph/nodes"
aria-disabled
onClick={(e: React.SyntheticEvent<HTMLAnchorElement>) => {
e.preventDefault()
}}
>
<span>{t('banner.find_nodes')}</span>
</Link>
</Tooltip>
</div>
</div>
)
Expand Down
10 changes: 5 additions & 5 deletions src/pages/NftCollections/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Pagination from '../../components/Pagination'
import { getPrimaryColor } from '../../constants/common'
import { explorerService } from '../../services/ExplorerService'
import { udtSubmitEmail } from '../../utils/util'
import { useIsMobile, useSearchParams } from '../../hooks'
import { useSearchParams } from '../../hooks'
import styles from './styles.module.scss'
import { useNFTCollectionsSortParam } from './util'

Expand All @@ -24,7 +24,6 @@ const NftCollections = () => {
const { search } = useLocation()
const { page = '1', type, tags } = useSearchParams('page', 'type', 'tags')
const { sort } = useNFTCollectionsSortParam()
const isMobile = useIsMobile()

const isValidFilter = isTxFilterType(type) && type !== 'all'

Expand Down Expand Up @@ -61,11 +60,12 @@ const NftCollections = () => {
</a>
</div>
<div className={styles.list}>
{isMobile ? (
<div className={styles.cardList}>
<ListOnMobile isLoading={isLoading} list={list} />
) : (
</div>
<div className={styles.tableList}>
<ListOnDesktop isLoading={isLoading} list={list} />
)}
</div>
</div>

<Pagination
Expand Down
12 changes: 10 additions & 2 deletions src/pages/NftCollections/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

.container {
margin: 40px 120px 60px;

.tableList {
display: block;
}

.cardList {
display: none;
}
}

.tags {
Expand Down Expand Up @@ -322,11 +330,11 @@
.container {
margin: 20px 16px 60px;

table[data-role='desktop-list'] {
.tableList {
display: none;
}

div[data-role='mobile-list'] {
.cardList {
display: block;
}
}
Expand Down

0 comments on commit 17f3cf7

Please sign in to comment.