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
04f91279
Unverified
Commit
04f91279
authored
Dec 02, 2022
by
Vignesh Mohankumar
Committed by
GitHub
Dec 02, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: remove more unused NFT code (#5525)
parent
5364eb57
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
7 additions
and
267 deletions
+7
-267
BagHeader.css.ts
src/nft/components/bag/BagHeader.css.ts
+0
-14
ProfileAssetRow.css.ts
src/nft/components/bag/profile/ProfileAssetRow.css.ts
+0
-13
utils.ts
src/nft/components/bag/profile/utils.ts
+2
-2
CollectionAsset.css.ts
src/nft/components/collection/CollectionAsset.css.ts
+0
-36
AssetPriceDetails.tsx
src/nft/components/details/AssetPriceDetails.tsx
+2
-2
ExpandableText.css.ts
src/nft/components/layout/ExpandableText.css.ts
+0
-31
ExpandableText.tsx
src/nft/components/layout/ExpandableText.tsx
+0
-48
Radio.css.ts
src/nft/components/layout/Radio.css.ts
+0
-53
Radio.tsx
src/nft/components/layout/Radio.tsx
+0
-21
NFTListingsGrid.tsx
src/nft/components/profile/list/NFTListingsGrid.tsx
+1
-1
ProfileAccountDetails.tsx
src/nft/components/profile/view/ProfileAccountDetails.tsx
+0
-44
ProfilePageLoadingSkeleton.tsx
...ft/components/profile/view/ProfilePageLoadingSkeleton.tsx
+2
-2
No files found.
src/nft/components/bag/BagHeader.css.ts
deleted
100644 → 0
View file @
5364eb57
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
headlineSmall
}
from
'
nft/css/common.css
'
import
{
sprinkles
}
from
'
nft/css/sprinkles.css
'
export
const
header
=
style
([
headlineSmall
,
sprinkles
({
color
:
'
textPrimary
'
,
justifyContent
:
'
space-between
'
,
}),
{
lineHeight
:
'
24px
'
,
},
])
src/nft/components/bag/profile/ProfileAssetRow.css.ts
deleted
100644 → 0
View file @
5364eb57
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
sprinkles
}
from
'
nft/css/sprinkles.css
'
export
const
removeAsset
=
style
([
sprinkles
({
position
:
'
absolute
'
,
cursor
:
'
pointer
'
,
}),
{
bottom
:
'
-4px
'
,
left
:
'
24px
'
,
},
])
src/nft/components/bag/profile/utils.ts
View file @
04f91279
...
...
@@ -5,7 +5,7 @@ import { AssetRow, CollectionRow, ListingMarket, ListingRow, ListingStatus, Wall
import
{
approveCollection
,
LOOKS_RARE_CREATOR_BASIS_POINTS
,
signListing
}
from
'
nft/utils/listNfts
'
import
{
Dispatch
}
from
'
react
'
export
const
updateStatus
=
({
const
updateStatus
=
({
listing
,
newStatus
,
rows
,
...
...
@@ -171,7 +171,7 @@ export const getListings = (sellAssets: WalletAsset[]): [CollectionRow[], Listin
return
[
newCollectionsToApprove
,
newListings
]
}
export
type
ListingState
=
{
type
ListingState
=
{
allListingsPending
:
boolean
allListingsDefined
:
boolean
allListingsApproved
:
boolean
...
...
src/nft/components/collection/CollectionAsset.css.ts
deleted
100644 → 0
View file @
5364eb57
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
sprinkles
}
from
'
../../css/sprinkles.css
'
export
const
buy
=
style
([
{
top
:
'
-32px
'
,
left
:
'
50%
'
,
transform
:
'
translateX(-50%)
'
,
},
sprinkles
({
color
:
'
backgroundSurface
'
,
position
:
'
absolute
'
,
borderRadius
:
'
round
'
}),
])
export
const
quantity
=
style
([
{
padding
:
'
9px 4px 8px
'
,
},
sprinkles
({
position
:
'
relative
'
,
}),
])
export
const
details
=
style
({
float
:
'
right
'
})
export
const
marketplace
=
style
({
position
:
'
absolute
'
,
left
:
'
0
'
,
bottom
:
'
12px
'
,
})
export
const
ethIcon
=
style
({
display
:
'
inline-block
'
,
marginBottom
:
'
-3px
'
,
overflow
:
'
auto
'
})
export
const
rarityInfo
=
style
({
background
:
'
rgba(255, 255, 255, 0.6)
'
,
backdropFilter
:
'
blur(6px)
'
,
})
src/nft/components/details/AssetPriceDetails.tsx
View file @
04f91279
...
...
@@ -198,7 +198,7 @@ const DefaultLink = styled(Link)`
text-decoration: none;
`
export
const
OwnerContainer
=
({
asset
}:
{
asset
:
GenieAsset
})
=>
{
const
OwnerContainer
=
({
asset
}:
{
asset
:
GenieAsset
})
=>
{
const
navigate
=
useNavigate
()
const
USDPrice
=
useUsdPrice
(
asset
)
const
setSellPageState
=
useProfilePageState
((
state
)
=>
state
.
setProfilePageState
)
...
...
@@ -275,7 +275,7 @@ const StyledLink = styled(Link)`
${
OpacityHoverState
}
`
export
const
NotForSale
=
({
collectionName
,
collectionUrl
}:
{
collectionName
:
string
;
collectionUrl
:
string
})
=>
{
const
NotForSale
=
({
collectionName
,
collectionUrl
}:
{
collectionName
:
string
;
collectionUrl
:
string
})
=>
{
const
theme
=
useTheme
()
return
(
...
...
src/nft/components/layout/ExpandableText.css.ts
deleted
100644 → 0
View file @
5364eb57
import
{
globalStyle
,
style
}
from
'
@vanilla-extract/css
'
import
{
sprinkles
}
from
'
../../css/sprinkles.css
'
export
const
hiddenText
=
style
([
sprinkles
({
overflow
:
'
hidden
'
,
}),
{
display
:
'
-webkit-box
'
,
WebkitLineClamp
:
2
,
WebkitBoxOrient
:
'
vertical
'
,
textOverflow
:
'
ellipsis
'
,
},
])
export
const
span
=
style
({})
globalStyle
(
`
${
hiddenText
}
p`
,
{
display
:
'
none
'
,
})
globalStyle
(
`
${
hiddenText
}
p:first-child`
,
{
display
:
'
block
'
,
})
globalStyle
(
`
${
span
}
p:first-child`
,
{
textOverflow
:
'
ellipsis
'
,
overflow
:
'
hidden
'
,
margin
:
0
,
})
src/nft/components/layout/ExpandableText.tsx
deleted
100644 → 0
View file @
5364eb57
import
clsx
from
'
clsx
'
import
{
useState
}
from
'
react
'
import
{
Box
,
BoxProps
}
from
'
../Box
'
import
*
as
styles
from
'
./ExpandableText.css
'
const
RevealButton
=
(
props
:
BoxProps
)
=>
(
<
Box
as=
"button"
display=
"inline"
fontWeight=
"bold"
border=
"none"
fontSize=
"14"
color=
"textSecondary"
padding=
"0"
background=
"transparent"
{
...
props
}
/>
)
export
const
ExpandableText
=
({
children
,
...
props
}:
BoxProps
)
=>
{
const
[
isExpanded
,
setExpanded
]
=
useState
(
false
)
return
(
<
Box
display=
"flex"
flexDirection=
{
isExpanded
?
'
column
'
:
'
row
'
}
alignItems=
{
isExpanded
?
'
flex-start
'
:
'
flex-end
'
}
justifyContent=
"flex-start"
fontSize=
"14"
color=
"textSecondary"
marginTop=
"0"
marginBottom=
"20"
{
...
props
}
>
<
span
className=
{
clsx
(
styles
.
span
,
!
isExpanded
&&
styles
.
hiddenText
)
}
>
{
children
}{
'
'
}
{
isExpanded
?
(
<
RevealButton
marginTop=
{
isExpanded
?
'
8
'
:
'
unset
'
}
onClick=
{
()
=>
setExpanded
(
!
isExpanded
)
}
>
Show less
</
RevealButton
>
)
:
(
<
RevealButton
onClick=
{
()
=>
setExpanded
(
!
isExpanded
)
}
>
Show more
</
RevealButton
>
)
}
</
span
>
</
Box
>
)
}
src/nft/components/layout/Radio.css.ts
deleted
100644 → 0
View file @
5364eb57
import
{
style
}
from
'
@vanilla-extract/css
'
import
{
sprinkles
,
vars
}
from
'
nft/css/sprinkles.css
'
export
const
radio
=
style
([
sprinkles
({
position
:
'
relative
'
,
display
:
'
inline-block
'
,
height
:
'
24
'
,
width
:
'
24
'
,
cursor
:
'
pointer
'
,
background
:
'
transparent
'
,
borderRadius
:
{
default
:
'
round
'
,
before
:
'
round
'
},
borderStyle
:
'
solid
'
,
borderWidth
:
'
2px
'
,
top
:
'
0
'
,
left
:
'
0
'
,
right
:
'
0
'
,
bottom
:
'
0
'
,
transition
:
{
default
:
'
250
'
,
before
:
'
250
'
,
},
}),
])
export
const
grayBorderRadio
=
style
([
radio
,
sprinkles
({
borderColor
:
'
gray400
'
,
}),
])
export
const
blueBorderRadio
=
style
([
radio
,
sprinkles
({
borderColor
:
'
blue400
'
,
}),
])
export
const
selectedRadio
=
style
([
blueBorderRadio
,
{
'
:before
'
:
{
position
:
'
absolute
'
,
backgroundColor
:
vars
.
color
.
blue400
,
content
:
''
,
height
:
'
14px
'
,
width
:
'
14px
'
,
top
:
3
,
left
:
3
,
},
},
])
src/nft/components/layout/Radio.tsx
deleted
100644 → 0
View file @
5364eb57
import
{
Box
}
from
'
nft/components/Box
'
import
*
as
styles
from
'
nft/components/layout/Radio.css
'
import
{
MouseEvent
}
from
'
react
'
interface
RadioProps
{
hovered
:
boolean
checked
:
boolean
onClick
:
(
e
:
MouseEvent
)
=>
void
}
export
const
Radio
=
({
hovered
,
checked
,
onClick
}:
RadioProps
)
=>
{
return
(
<
Box
as=
"label"
className=
{
checked
?
styles
.
selectedRadio
:
hovered
?
styles
.
blueBorderRadio
:
styles
.
grayBorderRadio
}
onClick=
{
onClick
}
/>
)
}
Radio
.
displayName
=
'
Radio
'
src/nft/components/profile/list/NFTListingsGrid.tsx
View file @
04f91279
...
...
@@ -453,7 +453,7 @@ const MarketplaceRow = ({
)
}
export
interface
NFTListRowProps
{
interface
NFTListRowProps
{
asset
:
WalletAsset
globalPriceMethod
?:
SetPriceMethod
setGlobalPrice
:
Dispatch
<
number
|
undefined
>
...
...
src/nft/components/profile/view/ProfileAccountDetails.tsx
deleted
100644 → 0
View file @
5364eb57
import
{
Trans
}
from
'
@lingui/macro
'
import
{
useWeb3React
}
from
'
@web3-react/core
'
import
Identicon
from
'
components/Identicon
'
import
{
MouseoverTooltip
}
from
'
components/Tooltip
'
import
useCopyClipboard
from
'
hooks/useCopyClipboard
'
import
{
Box
}
from
'
nft/components/Box
'
import
{
Row
}
from
'
nft/components/Flex
'
import
{
caption
,
headlineLarge
,
lightGrayOverlayOnHover
}
from
'
nft/css/common.css
'
import
{
useCallback
}
from
'
react
'
import
{
Copy
}
from
'
react-feather
'
import
{
shortenAddress
}
from
'
utils
'
export
const
ProfileAccountDetails
=
()
=>
{
const
{
account
,
ENSName
}
=
useWeb3React
()
const
[
isCopied
,
setCopied
]
=
useCopyClipboard
()
const
copy
=
useCallback
(()
=>
{
setCopied
(
account
??
''
)
},
[
account
,
setCopied
])
if
(
!
account
)
{
return
null
}
return
(
<
Row
className=
{
headlineLarge
}
marginBottom=
"48"
gap=
"4"
>
<
Identicon
size=
{
60
}
/>
<
Box
textOverflow=
"ellipsis"
overflow=
"hidden"
marginLeft=
"8"
>
{
ENSName
??
shortenAddress
(
account
)
}
</
Box
>
<
MouseoverTooltip
text=
{
<
Box
className=
{
caption
}
color=
"textPrimary"
>
{
isCopied
?
<
Trans
>
Copied!
</
Trans
>
:
<
Trans
>
Copy
</
Trans
>
}
</
Box
>
}
placement=
"right"
>
<
Box
paddingX=
"12"
borderRadius=
"12"
cursor=
"pointer"
className=
{
lightGrayOverlayOnHover
}
onClick=
{
copy
}
>
<
Copy
strokeWidth=
{
1.5
}
size=
{
20
}
/>
{
'
'
}
</
Box
>
</
MouseoverTooltip
>
</
Row
>
)
}
src/nft/components/profile/view/ProfilePageLoadingSkeleton.tsx
View file @
04f91279
...
...
@@ -56,13 +56,13 @@ const SellButtonSkeleton = styled.div`
border-radius: 12px;
`
export
const
ProfileAssetCardSkeleton
=
styled
.
div
`
const
ProfileAssetCardSkeleton
=
styled
.
div
`
width: 100%;
height: 330px;
border-radius: 20px;
`
export
const
ProfileAssetCardDisplaySectionSkeleton
=
()
=>
{
const
ProfileAssetCardDisplaySectionSkeleton
=
()
=>
{
return
(
<
Box
width=
"full"
className=
{
assetList
}
>
{
Array
.
from
(
Array
(
DEFAULT_WALLET_ASSET_QUERY_AMOUNT
),
(
_
,
index
)
=>
(
...
...
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