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
e03c5d12
Commit
e03c5d12
authored
Feb 27, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-review changes and style fix
parent
99a839fc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
6 deletions
+18
-6
MarketplaceAppAlert.tsx
ui/marketplace/MarketplaceAppAlert.tsx
+2
-3
WebsiteLink.tsx
ui/marketplace/MarketplaceAppInfo/WebsiteLink.tsx
+8
-1
MarketplaceAppTopBar.tsx
ui/marketplace/MarketplaceAppTopBar.tsx
+8
-2
No files found.
ui/marketplace/MarketplaceAppAlert.tsx
View file @
e03c5d12
...
@@ -10,7 +10,7 @@ type Props = {
...
@@ -10,7 +10,7 @@ type Props = {
internalWallet
:
boolean
|
undefined
;
internalWallet
:
boolean
|
undefined
;
}
}
const
MarketplaceApp
TopBar
=
({
internalWallet
}:
Props
)
=>
{
const
MarketplaceApp
Alert
=
({
internalWallet
}:
Props
)
=>
{
const
{
address
}
=
useMarketplaceWallet
();
const
{
address
}
=
useMarketplaceWallet
();
const
isWalletConnected
=
Boolean
(
address
);
const
isWalletConnected
=
Boolean
(
address
);
...
@@ -34,7 +34,6 @@ const MarketplaceAppTopBar = ({ internalWallet }: Props) => {
...
@@ -34,7 +34,6 @@ const MarketplaceAppTopBar = ({ internalWallet }: Props) => {
return
(
return
(
<
Alert
<
Alert
status=
{
message
.
status
}
status=
{
message
.
status
}
width=
{
{
base
:
'
100%
'
,
md
:
'
auto
'
}
}
borderRadius=
"base"
borderRadius=
"base"
px=
{
3
}
px=
{
3
}
py=
{
{
base
:
3
,
md
:
1.5
}
}
py=
{
{
base
:
3
,
md
:
1.5
}
}
...
@@ -53,4 +52,4 @@ const MarketplaceAppTopBar = ({ internalWallet }: Props) => {
...
@@ -53,4 +52,4 @@ const MarketplaceAppTopBar = ({ internalWallet }: Props) => {
);
);
};
};
export
default
MarketplaceApp
TopBar
;
export
default
MarketplaceApp
Alert
;
ui/marketplace/MarketplaceAppInfo/WebsiteLink.tsx
View file @
e03c5d12
...
@@ -11,6 +11,13 @@ const WebsiteLink = ({ url }: Props) => {
...
@@ -11,6 +11,13 @@ const WebsiteLink = ({ url }: Props) => {
if
(
!
url
)
{
if
(
!
url
)
{
return
null
;
return
null
;
}
}
function
getHostname
(
url
:
string
)
{
try
{
return
new
URL
(
url
).
hostname
;
}
catch
(
err
)
{}
}
return
(
return
(
<
Link
<
Link
href=
{
url
}
href=
{
url
}
...
@@ -21,7 +28,7 @@ const WebsiteLink = ({ url }: Props) => {
...
@@ -21,7 +28,7 @@ const WebsiteLink = ({ url }: Props) => {
mt=
{
3
}
mt=
{
3
}
>
>
<
IconSvg
name=
"link"
boxSize=
{
5
}
color=
"text_secondary"
/>
<
IconSvg
name=
"link"
boxSize=
{
5
}
color=
"text_secondary"
/>
<
span
>
{
(
new
URL
(
url
)).
hostname
}
</
span
>
<
span
>
{
getHostname
(
url
)
}
</
span
>
</
Link
>
</
Link
>
);
);
};
};
...
...
ui/marketplace/MarketplaceAppTopBar.tsx
View file @
e03c5d12
...
@@ -28,6 +28,12 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
...
@@ -28,6 +28,12 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
return
route
({
pathname
:
'
/apps
'
});
return
route
({
pathname
:
'
/apps
'
});
},
[
appProps
.
referrer
]);
},
[
appProps
.
referrer
]);
function
getHostname
(
url
:
string
|
undefined
)
{
try
{
return
new
URL
(
url
||
''
).
hostname
;
}
catch
(
err
)
{}
}
return
(
return
(
<
Flex
alignItems=
"center"
flexWrap=
"wrap"
mb=
{
{
base
:
6
,
md
:
2
}
}
rowGap=
{
3
}
columnGap=
{
2
}
>
<
Flex
alignItems=
"center"
flexWrap=
"wrap"
mb=
{
{
base
:
6
,
md
:
2
}
}
rowGap=
{
3
}
columnGap=
{
2
}
>
<
Tooltip
label=
"Back to dApps list"
order=
{
1
}
>
<
Tooltip
label=
"Back to dApps list"
order=
{
1
}
>
...
@@ -35,7 +41,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
...
@@ -35,7 +41,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
<
IconSvg
name=
"arrows/east"
boxSize=
{
6
}
transform=
"rotate(180deg)"
margin=
"auto"
color=
"gray.400"
/>
<
IconSvg
name=
"arrows/east"
boxSize=
{
6
}
transform=
"rotate(180deg)"
margin=
"auto"
color=
"gray.400"
/>
</
LinkInternal
>
</
LinkInternal
>
</
Tooltip
>
</
Tooltip
>
<
Skeleton
order=
{
{
base
:
4
,
md
:
2
}
}
isLoaded=
{
!
isLoading
}
>
<
Skeleton
width=
{
{
base
:
'
100%
'
,
md
:
'
auto
'
}
}
order=
{
{
base
:
4
,
md
:
2
}
}
isLoaded=
{
!
isLoading
}
>
<
MarketplaceAppAlert
internalWallet=
{
data
?.
internalWallet
}
/>
<
MarketplaceAppAlert
internalWallet=
{
data
?.
internalWallet
}
/>
</
Skeleton
>
</
Skeleton
>
<
Skeleton
order=
{
{
base
:
2
,
md
:
3
}
}
isLoaded=
{
!
isLoading
}
>
<
Skeleton
order=
{
{
base
:
2
,
md
:
3
}
}
isLoaded=
{
!
isLoading
}
>
...
@@ -53,7 +59,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
...
@@ -53,7 +59,7 @@ const MarketplaceAppTopBar = ({ data, isLoading }: Props) => {
isLoading=
{
isLoading
}
isLoading=
{
isLoading
}
>
>
<
chakra
.
span
isTruncated
>
<
chakra
.
span
isTruncated
>
{
data
?.
url
?
(
new
URL
(
data
.
url
)).
hostname
:
''
}
{
getHostname
(
data
?.
url
)
}
</
chakra
.
span
>
</
chakra
.
span
>
</
LinkExternal
>
</
LinkExternal
>
</
Flex
>
</
Flex
>
...
...
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