Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
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
LuckySwap
interface
Commits
5caed66b
Unverified
Commit
5caed66b
authored
Nov 04, 2022
by
Greg Bugyis
Committed by
GitHub
Nov 04, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: Remove rank on trending collection table (mobile) (#5086)
parent
136c16bb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
63 deletions
+11
-63
Explore.css.ts
src/nft/components/explore/Explore.css.ts
+0
-59
Table.tsx
src/nft/components/explore/Table.tsx
+11
-4
No files found.
src/nft/components/explore/Explore.css.ts
View file @
5caed66b
...
@@ -43,20 +43,6 @@ export const bannerOverlay = style([
...
@@ -43,20 +43,6 @@ export const bannerOverlay = style([
}),
}),
])
])
export
const
collectionName
=
style
([
sprinkles
({
textAlign
:
'
left
'
,
overflow
:
'
hidden
'
,
whiteSpace
:
'
nowrap
'
,
textOverflow
:
'
ellipsis
'
,
display
:
'
inline-block
'
,
color
:
'
explicitWhite
'
,
}),
{
maxWidth
:
'
calc(100% - 80px)
'
,
},
])
export
const
collectionDetails
=
style
([
export
const
collectionDetails
=
style
([
sprinkles
({
sprinkles
({
width
:
'
full
'
,
width
:
'
full
'
,
...
@@ -70,43 +56,6 @@ export const collectionDetails = style([
...
@@ -70,43 +56,6 @@ export const collectionDetails = style([
},
},
])
])
export
const
volumeRank
=
style
([
sprinkles
({
paddingTop
:
'
8
'
,
paddingBottom
:
'
8
'
,
paddingRight
:
'
16
'
,
paddingLeft
:
'
16
'
,
color
:
'
blue400
'
,
background
:
'
accentActionSoft
'
,
}),
{
borderRadius
:
'
64px
'
,
maxWidth
:
'
172px
'
,
},
])
export
const
exploreCollection
=
style
([
{
width
:
'
176px
'
,
},
sprinkles
({
color
:
'
explicitWhite
'
,
marginTop
:
'
36
'
,
borderRadius
:
'
12
'
,
padding
:
'
12
'
,
paddingRight
:
'
16
'
,
paddingLeft
:
'
16
'
,
}),
])
export
const
carouselIndicator
=
sprinkles
({
width
:
'
36
'
,
height
:
'
4
'
,
marginRight
:
'
6
'
,
borderRadius
:
'
round
'
,
display
:
'
inline-block
'
,
})
/* Activity Feed Styles */
/* Activity Feed Styles */
export
const
activityRow
=
style
([
export
const
activityRow
=
style
([
sprinkles
({
sprinkles
({
...
@@ -185,14 +134,6 @@ export const th = style([
...
@@ -185,14 +134,6 @@ export const th = style([
}),
}),
])
])
export
const
rank
=
sprinkles
({
color
:
'
textSecondary
'
,
position
:
'
absolute
'
,
display
:
{
md
:
'
inline-block
'
,
sm
:
'
none
'
},
left
:
'
24
'
,
top
:
'
20
'
,
})
export
const
td
=
style
([
export
const
td
=
style
([
body
,
body
,
{
{
...
...
src/nft/components/explore/Table.tsx
View file @
5caed66b
import
clsx
from
'
clsx
'
import
clsx
from
'
clsx
'
import
{
LoadingBubble
}
from
'
components/Tokens/loading
'
import
{
LoadingBubble
}
from
'
components/Tokens/loading
'
import
{
useWindowSize
}
from
'
hooks/useWindowSize
'
import
{
useWindowSize
}
from
'
hooks/useWindowSize
'
import
{
useIsMobile
}
from
'
nft/hooks
'
import
{
useEffect
}
from
'
react
'
import
{
useEffect
}
from
'
react
'
import
{
useNavigate
}
from
'
react-router-dom
'
import
{
useNavigate
}
from
'
react-router-dom
'
import
{
Column
,
ColumnInstance
,
HeaderGroup
,
IdType
,
useSortBy
,
useTable
}
from
'
react-table
'
import
{
Column
,
ColumnInstance
,
HeaderGroup
,
IdType
,
useSortBy
,
useTable
}
from
'
react-table
'
...
@@ -18,6 +19,9 @@ const RankCellContainer = styled.div`
...
@@ -18,6 +19,9 @@ const RankCellContainer = styled.div`
align-items: center;
align-items: center;
padding-left: 24px;
padding-left: 24px;
gap: 12px;
gap: 12px;
@media only screen and (max-width:
${({
theme
})
=>
`
${
theme
.
breakpoint
.
sm
}
px`
}
) {
padding-left: 8px;
}
`
`
const
StyledRow
=
styled
.
tr
`
const
StyledRow
=
styled
.
tr
`
...
@@ -95,6 +99,7 @@ export function Table<D extends Record<string, unknown>>({
...
@@ -95,6 +99,7 @@ export function Table<D extends Record<string, unknown>>({
}:
TableProps
<
D
>
)
{
}:
TableProps
<
D
>
)
{
const
theme
=
useTheme
()
const
theme
=
useTheme
()
const
{
width
}
=
useWindowSize
()
const
{
width
}
=
useWindowSize
()
const
isMobile
=
useIsMobile
()
const
{
getTableProps
,
getTableBodyProps
,
headerGroups
,
rows
,
prepareRow
,
setHiddenColumns
,
visibleColumns
}
=
const
{
getTableProps
,
getTableBodyProps
,
headerGroups
,
rows
,
prepareRow
,
setHiddenColumns
,
visibleColumns
}
=
useTable
(
useTable
(
...
@@ -146,7 +151,7 @@ export function Table<D extends Record<string, unknown>>({
...
@@ -146,7 +151,7 @@ export function Table<D extends Record<string, unknown>>({
{
...
column
.
getHeaderProps
(
column
.
getSortByToggleProps
())}
{
...
column
.
getHeaderProps
(
column
.
getSortByToggleProps
())}
style=
{
{
style=
{
{
textAlign
:
index
===
0
?
'
left
'
:
'
right
'
,
textAlign
:
index
===
0
?
'
left
'
:
'
right
'
,
paddingLeft
:
index
===
0
?
'
52px
'
:
0
,
paddingLeft
:
index
===
0
?
(
isMobile
?
'
16px
'
:
'
52px
'
)
:
0
,
}
}
}
}
isFirstHeader=
{
index
===
0
}
isFirstHeader=
{
index
===
0
}
key=
{
index
}
key=
{
index
}
...
@@ -186,9 +191,11 @@ export function Table<D extends Record<string, unknown>>({
...
@@ -186,9 +191,11 @@ export function Table<D extends Record<string, unknown>>({
<
td
className=
{
clsx
(
styles
.
td
,
classNames
?.
td
)
}
{
...
cell
.
getCellProps
()}
key=
{
cellIndex
}
>
<
td
className=
{
clsx
(
styles
.
td
,
classNames
?.
td
)
}
{
...
cell
.
getCellProps
()}
key=
{
cellIndex
}
>
{
cellIndex
===
0
?
(
{
cellIndex
===
0
?
(
<
RankCellContainer
>
<
RankCellContainer
>
{
!
isMobile
&&
(
<
ThemedText
.
BodySecondary
fontSize=
"14px"
lineHeight=
"20px"
>
<
ThemedText
.
BodySecondary
fontSize=
"14px"
lineHeight=
"20px"
>
{
i
+
1
}
{
i
+
1
}
</
ThemedText
.
BodySecondary
>
</
ThemedText
.
BodySecondary
>
)
}
{
cell
.
render
(
'
Cell
'
)
}
{
cell
.
render
(
'
Cell
'
)
}
</
RankCellContainer
>
</
RankCellContainer
>
)
:
(
)
:
(
...
...
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