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
5c869f12
Commit
5c869f12
authored
Sep 26, 2022
by
tom
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'main' of github.com:blockscout/frontend into tx-mobile-view
parents
3765c995
0c270cc6
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
187 additions
and
41 deletions
+187
-41
east.svg
icons/arrows/east.svg
+0
-0
north-east.svg
icons/arrows/north-east.svg
+3
-0
star_filled.svg
icons/star_filled.svg
+3
-0
star_outline.svg
icons/star_outline.svg
+1
-1
AppCard.tsx
ui/apps/AppCard.tsx
+104
-11
AppList.tsx
ui/apps/AppList.tsx
+50
-6
AppModal.tsx
ui/apps/AppModal.tsx
+14
-15
Apps.tsx
ui/pages/Apps.tsx
+10
-6
TokenTransfer.tsx
ui/tx/TokenTransfer.tsx
+1
-1
TxInternalsTableItem.tsx
ui/tx/internals/TxInternalsTableItem.tsx
+1
-1
No files found.
icons/arrows/
righ
t.svg
→
icons/arrows/
eas
t.svg
View file @
5c869f12
File moved
icons/arrows/north-east.svg
0 → 100644
View file @
5c869f12
<svg
viewBox=
"0 0 16 16"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"m11.003 6.276-5.267 5.267a.667.667 0 0 1-.943-.943l5.266-5.267H5.67A.667.667 0 1 1 5.67 4h6.667v6.667a.667.667 0 0 1-1.333 0V6.276Z"
fill=
"currentColor"
/>
</svg>
icons/star_filled.svg
0 → 100644
View file @
5c869f12
<svg
viewBox=
"0 0 18 18"
fill=
"none"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
d=
"M13.76 17.333a.603.603 0 0 1-.294-.075L9 14.798l-4.467 2.46a.606.606 0 0 1-.663-.051.657.657 0 0 1-.213-.285.69.69 0 0 1-.038-.36l.854-5.21-3.616-3.69a.69.69 0 0 1-.16-.677.663.663 0 0 1 .194-.301c.09-.08.2-.131.316-.149l4.994-.76 2.234-4.74a.65.65 0 0 1 .232-.269.61.61 0 0 1 .666 0c.1.065.18.158.233.269l2.233 4.74 4.994.76c.117.018.226.07.316.149a.66.66 0 0 1 .193.3.69.69 0 0 1-.16.678l-3.614 3.69.853 5.21a.692.692 0 0 1-.14.537.634.634 0 0 1-.216.173.605.605 0 0 1-.265.061Z"
fill=
"currentColor"
/>
</svg>
icons/star_outline.svg
View file @
5c869f12
<svg
viewBox=
"0 0 18 18"
fill=
"currentColor"
xmlns=
"http://www.w3.org/2000/svg"
>
<svg
viewBox=
"0 0 18 18"
fill=
"currentColor"
xmlns=
"http://www.w3.org/2000/svg"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M13.76 17.333a.604.604 0 0 1-.294-.075l.293.075Zm.004 0a.625.625 0 0 0 .477-.234.671.671 0 0 0 .14-.538l-.853-5.21 3.615-3.689a.69.69 0 0 0 .16-.677.663.663 0 0 0-.194-.301.617.617 0 0 0-.316-.149l-4.884-.743a.208.208 0 0 1-.157-.117l-2.186-4.64a.65.65 0 0 0-.233-.269.61.61 0 0 0-.666 0 .65.65 0 0 0-.232.269l-2.186 4.64a.208.208 0 0 1-.158.117l-4.884.743a.618.618 0 0 0-.316.149.663.663 0 0 0-.193.3.69.69 0 0 0 .16.678l3.54 3.614a.208.208 0 0 1 .058.18l-.837 5.105a.69.69 0 0 0 .038.36.657.657 0 0 0 .213.286.613.613 0 0 0 .663.05L8.9 14.854a.208.208 0 0 1 .2 0l4.366 2.405m-7.795-2.915c-.028.172.154.3.307.216L8.9 12.95a.208.208 0 0 1 .2 0l2.923 1.61a.208.208 0 0 0 .306-.216l-.566-3.452a.208.208 0 0 1 .057-.18l2.486-2.536a.208.208 0 0 0-.118-.351l-3.408-.519a.208.208 0 0 1-.157-.117L9.189 4.145a.208.208 0 0 0-.377 0L7.378 7.19a.208.208 0 0 1-.158.117l-3.408.519a.208.208 0 0 0-.117.351l2.485 2.537a.208.208 0 0 1 .057.18l-.566 3.45Zm8.093 2.99h-.003.003Z"
fill=
"#4A5568"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M13.76 17.333a.604.604 0 0 1-.294-.075l.293.075Zm.004 0a.625.625 0 0 0 .477-.234.671.671 0 0 0 .14-.538l-.853-5.21 3.615-3.689a.69.69 0 0 0 .16-.677.663.663 0 0 0-.194-.301.617.617 0 0 0-.316-.149l-4.884-.743a.208.208 0 0 1-.157-.117l-2.186-4.64a.65.65 0 0 0-.233-.269.61.61 0 0 0-.666 0 .65.65 0 0 0-.232.269l-2.186 4.64a.208.208 0 0 1-.158.117l-4.884.743a.618.618 0 0 0-.316.149.663.663 0 0 0-.193.3.69.69 0 0 0 .16.678l3.54 3.614a.208.208 0 0 1 .058.18l-.837 5.105a.69.69 0 0 0 .038.36.657.657 0 0 0 .213.286.613.613 0 0 0 .663.05L8.9 14.854a.208.208 0 0 1 .2 0l4.366 2.405m-7.795-2.915c-.028.172.154.3.307.216L8.9 12.95a.208.208 0 0 1 .2 0l2.923 1.61a.208.208 0 0 0 .306-.216l-.566-3.452a.208.208 0 0 1 .057-.18l2.486-2.536a.208.208 0 0 0-.118-.351l-3.408-.519a.208.208 0 0 1-.157-.117L9.189 4.145a.208.208 0 0 0-.377 0L7.378 7.19a.208.208 0 0 1-.158.117l-3.408.519a.208.208 0 0 0-.117.351l2.485 2.537a.208.208 0 0 1 .057.18l-.566 3.45Zm8.093 2.99h-.003.003Z"
/>
</svg>
</svg>
ui/apps/AppCard.tsx
View file @
5c869f12
import
{
Box
,
Heading
,
Image
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
LinkBox
,
LinkOverlay
,
Text
,
useColorModeValue
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
type
{
MouseEvent
}
from
'
react
'
;
import
React
,
{
useCallback
}
from
'
react
'
;
import
type
{
AppItemPreview
}
from
'
types/client/apps
'
;
import
type
{
AppItemPreview
}
from
'
types/client/apps
'
;
const
AppCard
=
({
title
,
logo
,
shortDescription
,
categories
}:
AppItemPreview
)
=>
{
import
northEastIcon
from
'
icons/arrows/north-east.svg
'
;
import
starFilledIcon
from
'
icons/star_filled.svg
'
;
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
interface
Props
extends
AppItemPreview
{
onInfoClick
:
(
id
:
string
)
=>
void
;
isFavorite
:
boolean
;
onFavoriteClick
:
(
id
:
string
,
isFavorite
:
boolean
)
=>
void
;
}
const
AppCard
=
({
id
,
title
,
logo
,
shortDescription
,
categories
,
onInfoClick
,
isFavorite
,
onFavoriteClick
,
}:
Props
)
=>
{
const
categoriesLabel
=
categories
.
map
(
c
=>
c
.
name
).
join
(
'
,
'
);
const
categoriesLabel
=
categories
.
map
(
c
=>
c
.
name
).
join
(
'
,
'
);
const
handleInfoClick
=
useCallback
((
event
:
MouseEvent
)
=>
{
event
.
preventDefault
();
onInfoClick
(
id
);
},
[
onInfoClick
,
id
]);
const
handleFavoriteClick
=
useCallback
(()
=>
{
onFavoriteClick
(
id
,
isFavorite
);
},
[
onFavoriteClick
,
id
,
isFavorite
]);
return
(
return
(
<
LinkBox
_hover=
{
{
boxShadow
:
'
md
'
,
}
}
_focusWithin=
{
{
boxShadow
:
'
md
'
,
}
}
borderRadius=
"md"
height=
"100%"
padding=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
border=
"1px"
borderColor=
{
useColorModeValue
(
'
gray.200
'
,
'
gray.600
'
)
}
>
<
Box
<
Box
borderRadius=
{
{
base
:
'
none
'
,
sm
:
'
md
'
}
}
display=
{
{
base
:
'
grid
'
,
sm
:
'
block
'
}
}
gridTemplateColumns=
{
{
base
:
'
64px 1fr
'
,
sm
:
'
1fr
'
}
}
gridTemplateRows=
{
{
base
:
'
20px 20px auto
'
,
sm
:
'
none
'
}
}
gridRowGap=
{
{
base
:
2
,
sm
:
'
none
'
}
}
gridColumnGap=
{
{
base
:
4
,
sm
:
'
none
'
}
}
height=
"100%"
height=
"100%"
padding=
{
{
base
:
'
16px
'
,
sm
:
'
20px
'
}
}
boxShadow=
{
`0 0 0 1px ${ useColorModeValue('var(--chakra-colors-gray-200)', 'var(--chakra-colors-gray-600)') }`
}
>
>
<
Box
overflow=
"hidden"
height=
"100%"
>
<
Box
<
Box
gridRow=
{
{
base
:
'
1 / 4
'
,
sm
:
'
auto
'
}
}
marginBottom=
{
4
}
marginBottom=
{
4
}
w=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
w=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
h=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
h=
{
{
base
:
'
64px
'
,
sm
:
'
96px
'
}
}
...
@@ -26,12 +70,17 @@ const AppCard = ({ title, logo, shortDescription, categories }: AppItemPreview)
...
@@ -26,12 +70,17 @@ const AppCard = ({ title, logo, shortDescription, categories }: AppItemPreview)
</
Box
>
</
Box
>
<
Heading
<
Heading
gridColumn=
{
{
base
:
2
,
sm
:
'
auto
'
}
}
as=
"h3"
as=
"h3"
marginBottom=
{
2
}
marginBottom=
{
2
}
fontSize=
{
{
base
:
'
sm
'
,
sm
:
'
lg
'
}
}
fontSize=
{
{
base
:
'
sm
'
,
sm
:
'
lg
'
}
}
fontWeight=
"semibold"
fontWeight=
"semibold"
>
<
LinkOverlay
href=
"#"
>
>
{
title
}
{
title
}
</
LinkOverlay
>
</
Heading
>
</
Heading
>
<
Text
<
Text
...
@@ -49,9 +98,53 @@ const AppCard = ({ title, logo, shortDescription, categories }: AppItemPreview)
...
@@ -49,9 +98,53 @@ const AppCard = ({ title, logo, shortDescription, categories }: AppItemPreview)
>
>
{
shortDescription
}
{
shortDescription
}
</
Text
>
</
Text
>
<
Box
position=
"absolute"
right=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
bottom=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
paddingTop=
{
1
}
paddingLeft=
{
8
}
bgGradient=
{
`linear(to-r, transparent, ${ useColorModeValue('white', 'black') } 20%)`
}
>
<
Link
fontSize=
{
{
base
:
'
xs
'
,
sm
:
'
sm
'
}
}
display=
"flex"
alignItems=
"center"
paddingRight=
{
{
sm
:
2
}
}
maxW=
"100%"
overflow=
"hidden"
href=
"#"
onClick=
{
handleInfoClick
}
>
More
<
Icon
as=
{
northEastIcon
}
marginLeft=
{
1
}
/>
</
Link
>
</
Box
>
</
Box
>
<
IconButton
position=
"absolute"
right=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
top=
{
{
base
:
3
,
sm
:
'
20px
'
}
}
aria
-
label=
"Mark as favorite"
title=
"Mark as favorite"
variant=
"ghost"
colorScheme=
"gray"
w=
{
9
}
h=
{
8
}
onClick=
{
handleFavoriteClick
}
icon=
{
isFavorite
?
<
Icon
as=
{
starFilledIcon
}
w=
{
4
}
h=
{
4
}
color=
"yellow.400"
/>
:
<
Icon
as=
{
starOutlineIcon
}
w=
{
4
}
h=
{
4
}
color=
"gray.300"
/>
}
/>
</
Box
>
</
Box
>
</
LinkBox
>
);
);
};
};
export
default
AppCard
;
export
default
React
.
memo
(
AppCard
)
;
ui/apps/AppList.tsx
View file @
5c869f12
import
{
Grid
,
GridItem
,
VisuallyHidden
,
Heading
}
from
'
@chakra-ui/react
'
;
import
{
Grid
,
GridItem
,
VisuallyHidden
,
Heading
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
,
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
;
import
type
{
AppItemPreview
}
from
'
types/client/apps
'
;
import
type
{
AppItemPreview
}
from
'
types/client/apps
'
;
...
@@ -7,11 +7,44 @@ import { apos } from 'lib/html-entities';
...
@@ -7,11 +7,44 @@ import { apos } from 'lib/html-entities';
import
AppCard
from
'
ui/apps/AppCard
'
;
import
AppCard
from
'
ui/apps/AppCard
'
;
import
EmptySearchResult
from
'
ui/apps/EmptySearchResult
'
;
import
EmptySearchResult
from
'
ui/apps/EmptySearchResult
'
;
import
AppModal
from
'
./AppModal
'
;
type
Props
=
{
type
Props
=
{
apps
:
Array
<
AppItemPreview
>
;
apps
:
Array
<
AppItemPreview
>
;
onAppClick
:
(
id
:
string
)
=>
void
;
displayedAppId
:
string
|
null
;
onModalClose
:
()
=>
void
;
}
function
getFavoriteApps
()
{
try
{
return
JSON
.
parse
(
localStorage
.
getItem
(
'
favoriteApps
'
)
||
'
[]
'
);
}
catch
(
e
)
{
return
[];
}
}
}
const
AppList
=
({
apps
}:
Props
)
=>
{
const
AppList
=
({
apps
,
onAppClick
,
displayedAppId
,
onModalClose
}:
Props
)
=>
{
const
[
favoriteApps
,
setFavoriteApps
]
=
useState
<
Array
<
string
>>
([]);
const
handleFavoriteClick
=
useCallback
((
id
:
string
,
isFavorite
:
boolean
)
=>
{
const
favoriteApps
=
getFavoriteApps
();
if
(
isFavorite
)
{
const
result
=
favoriteApps
.
filter
((
appId
:
string
)
=>
appId
!==
id
);
setFavoriteApps
(
result
);
localStorage
.
setItem
(
'
favoriteApps
'
,
JSON
.
stringify
(
result
));
}
else
{
favoriteApps
.
push
(
id
);
localStorage
.
setItem
(
'
favoriteApps
'
,
JSON
.
stringify
(
favoriteApps
));
setFavoriteApps
(
favoriteApps
);
}
},
[
]);
useEffect
(()
=>
{
setFavoriteApps
(
getFavoriteApps
());
},
[
]);
return
(
return
(
<>
<>
<
VisuallyHidden
>
<
VisuallyHidden
>
...
@@ -21,23 +54,25 @@ const AppList = ({ apps }: Props) => {
...
@@ -21,23 +54,25 @@ const AppList = ({ apps }: Props) => {
{
apps
.
length
>
0
?
(
{
apps
.
length
>
0
?
(
<
Grid
<
Grid
templateColumns=
{
{
templateColumns=
{
{
base
:
'
repeat(auto-fill, minmax(160px, 1fr))
'
,
sm
:
'
repeat(auto-fill, minmax(170px, 1fr))
'
,
sm
:
'
repeat(auto-fill, minmax(200px, 1fr))
'
,
lg
:
'
repeat(auto-fill, minmax(260px, 1fr))
'
,
lg
:
'
repeat(auto-fill, minmax(260px, 1fr))
'
,
}
}
}
}
autoRows=
"1fr"
autoRows=
"1fr"
gap=
{
{
base
:
'
1px
'
,
sm
:
'
24px
'
}
}
gap=
{
{
base
:
'
1
6
px
'
,
sm
:
'
24px
'
}
}
>
>
{
apps
.
map
((
app
)
=>
(
{
apps
.
map
((
app
)
=>
(
<
GridItem
<
GridItem
key=
{
app
.
id
}
key=
{
app
.
id
}
>
>
<
AppCard
<
AppCard
onInfoClick=
{
onAppClick
}
id=
{
app
.
id
}
id=
{
app
.
id
}
title=
{
app
.
title
}
title=
{
app
.
title
}
logo=
{
app
.
logo
}
logo=
{
app
.
logo
}
shortDescription=
{
app
.
shortDescription
}
shortDescription=
{
app
.
shortDescription
}
categories=
{
app
.
categories
}
categories=
{
app
.
categories
}
isFavorite=
{
favoriteApps
.
includes
(
app
.
id
)
}
onFavoriteClick=
{
handleFavoriteClick
}
/>
/>
</
GridItem
>
</
GridItem
>
))
}
))
}
...
@@ -45,8 +80,17 @@ const AppList = ({ apps }: Props) => {
...
@@ -45,8 +80,17 @@ const AppList = ({ apps }: Props) => {
)
:
(
)
:
(
<
EmptySearchResult
text=
{
`Couldn${ apos }t find an app that matches your filter query.`
}
/>
<
EmptySearchResult
text=
{
`Couldn${ apos }t find an app that matches your filter query.`
}
/>
)
}
)
}
{
displayedAppId
&&
(
<
AppModal
id=
{
displayedAppId
}
onClose=
{
onModalClose
}
isFavorite=
{
favoriteApps
.
includes
(
displayedAppId
)
}
onFavoriteClick=
{
handleFavoriteClick
}
/>
)
}
</>
</>
);
);
};
};
export
default
AppList
;
export
default
React
.
memo
(
AppList
)
;
ui/apps/AppModal.tsx
View file @
5c869f12
import
{
LinkIcon
,
StarIcon
}
from
'
@chakra-ui/icons
'
;
import
{
LinkIcon
}
from
'
@chakra-ui/icons
'
;
import
{
import
{
Box
,
Button
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
List
,
Modal
,
ModalBody
,
Box
,
Button
,
Heading
,
Icon
,
IconButton
,
Image
,
Link
,
List
,
Modal
,
ModalBody
,
ModalCloseButton
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Tag
,
Text
,
ModalCloseButton
,
ModalContent
,
ModalFooter
,
ModalHeader
,
ModalOverlay
,
Tag
,
Text
,
...
@@ -12,26 +12,23 @@ import { TEMPORARY_DEMO_APPS } from 'data/apps';
...
@@ -12,26 +12,23 @@ import { TEMPORARY_DEMO_APPS } from 'data/apps';
import
ghIcon
from
'
icons/social/git.svg
'
;
import
ghIcon
from
'
icons/social/git.svg
'
;
import
tgIcon
from
'
icons/social/telega.svg
'
;
import
tgIcon
from
'
icons/social/telega.svg
'
;
import
twIcon
from
'
icons/social/tweet.svg
'
;
import
twIcon
from
'
icons/social/tweet.svg
'
;
import
starFilledIcon
from
'
icons/star_filled.svg
'
;
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
import
starOutlineIcon
from
'
icons/star_outline.svg
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
import
{
nbsp
}
from
'
lib/html-entities
'
;
type
Props
=
{
type
Props
=
{
id
:
string
|
null
;
id
:
string
;
onClose
:
()
=>
void
;
onClose
:
()
=>
void
;
isFavorite
:
boolean
;
onFavoriteClick
:
(
id
:
string
,
isFavorite
:
boolean
)
=>
void
;
}
}
const
AppModal
=
({
const
AppModal
=
({
id
,
id
,
onClose
,
onClose
,
isFavorite
,
onFavoriteClick
,
}:
Props
)
=>
{
}:
Props
)
=>
{
const
handleFavorite
=
useCallback
(()
=>
{
// TODO: implement
},
[]);
if
(
!
id
)
{
return
null
;
}
const
{
const
{
title
,
title
,
author
,
author
,
...
@@ -45,8 +42,6 @@ const AppModal = ({
...
@@ -45,8 +42,6 @@ const AppModal = ({
categories
,
categories
,
}
=
TEMPORARY_DEMO_APPS
.
find
(
app
=>
app
.
id
===
id
)
as
AppItemOverview
;
}
=
TEMPORARY_DEMO_APPS
.
find
(
app
=>
app
.
id
===
id
)
as
AppItemOverview
;
const
isFavorite
=
false
;
const
socialLinks
=
[
const
socialLinks
=
[
Boolean
(
telegram
)
&&
{
Boolean
(
telegram
)
&&
{
icon
:
tgIcon
,
icon
:
tgIcon
,
...
@@ -62,6 +57,10 @@ const AppModal = ({
...
@@ -62,6 +57,10 @@ const AppModal = ({
},
},
].
filter
(
Boolean
)
as
Array
<
{
icon
:
FunctionComponent
;
url
:
string
}
>
;
].
filter
(
Boolean
)
as
Array
<
{
icon
:
FunctionComponent
;
url
:
string
}
>
;
const
handleFavoriteClick
=
useCallback
(()
=>
{
onFavoriteClick
(
id
,
isFavorite
);
},
[
onFavoriteClick
,
id
,
isFavorite
]);
return
(
return
(
<
Modal
<
Modal
isOpen=
{
Boolean
(
id
)
}
isOpen=
{
Boolean
(
id
)
}
...
@@ -135,10 +134,10 @@ const AppModal = ({
...
@@ -135,10 +134,10 @@ const AppModal = ({
colorScheme=
"gray"
colorScheme=
"gray"
w=
{
9
}
w=
{
9
}
h=
{
8
}
h=
{
8
}
onClick=
{
handleFavorite
}
onClick=
{
handleFavorite
Click
}
icon=
{
isFavorite
?
icon=
{
isFavorite
?
<
Icon
as=
{
Star
Icon
}
w=
{
4
}
h=
{
4
}
color=
"yellow.400"
/>
:
<
Icon
as=
{
starFilled
Icon
}
w=
{
4
}
h=
{
4
}
color=
"yellow.400"
/>
:
<
Icon
as=
{
starOutlineIcon
}
w=
{
4
}
h=
{
4
}
/>
}
<
Icon
as=
{
starOutlineIcon
}
w=
{
4
}
h=
{
4
}
color=
"gray.300"
/>
}
/>
/>
</
Box
>
</
Box
>
</
Box
>
</
Box
>
...
...
ui/pages/Apps.tsx
View file @
5c869f12
...
@@ -5,7 +5,6 @@ import type { AppItemOverview } from 'types/client/apps';
...
@@ -5,7 +5,6 @@ import type { AppItemOverview } from 'types/client/apps';
import
{
TEMPORARY_DEMO_APPS
}
from
'
data/apps
'
;
import
{
TEMPORARY_DEMO_APPS
}
from
'
data/apps
'
;
import
AppList
from
'
ui/apps/AppList
'
;
import
AppList
from
'
ui/apps/AppList
'
;
import
AppModal
from
'
ui/apps/AppModal
'
;
import
FilterInput
from
'
ui/shared/FilterInput
'
;
import
FilterInput
from
'
ui/shared/FilterInput
'
;
const
defaultDisplayedApps
=
[
...
TEMPORARY_DEMO_APPS
]
const
defaultDisplayedApps
=
[
...
TEMPORARY_DEMO_APPS
]
...
@@ -13,7 +12,11 @@ const defaultDisplayedApps = [ ...TEMPORARY_DEMO_APPS ]
...
@@ -13,7 +12,11 @@ const defaultDisplayedApps = [ ...TEMPORARY_DEMO_APPS ]
const
Apps
=
()
=>
{
const
Apps
=
()
=>
{
const
[
displayedApps
,
setDisplayedApps
]
=
useState
<
Array
<
AppItemOverview
>>
(
defaultDisplayedApps
);
const
[
displayedApps
,
setDisplayedApps
]
=
useState
<
Array
<
AppItemOverview
>>
(
defaultDisplayedApps
);
const
[
displayedAppId
,
setDisplayedAppId
]
=
useState
<
string
|
null
>
(
'
component
'
);
const
[
displayedAppId
,
setDisplayedAppId
]
=
useState
<
string
|
null
>
(
null
);
const
showAppInfo
=
useCallback
((
id
:
string
)
=>
{
setDisplayedAppId
(
id
);
},
[]);
const
filterApps
=
(
q
:
string
)
=>
{
const
filterApps
=
(
q
:
string
)
=>
{
const
apps
=
displayedApps
const
apps
=
displayedApps
...
@@ -30,10 +33,11 @@ const Apps = () => {
...
@@ -30,10 +33,11 @@ const Apps = () => {
return
(
return
(
<>
<>
<
FilterInput
onChange=
{
debounceFilterApps
}
marginBottom=
{
{
base
:
'
4
'
,
lg
:
'
6
'
}
}
placeholder=
"Find app"
/>
<
FilterInput
onChange=
{
debounceFilterApps
}
marginBottom=
{
{
base
:
'
4
'
,
lg
:
'
6
'
}
}
placeholder=
"Find app"
/>
<
AppList
apps=
{
displayedApps
}
/>
<
AppList
<
AppModal
apps=
{
displayedApps
}
id=
{
displayedAppId
}
onAppClick=
{
showAppInfo
}
onClose=
{
clearDisplayedAppId
}
displayedAppId=
{
displayedAppId
}
onModalClose=
{
clearDisplayedAppId
}
/>
/>
</>
</>
);
);
...
...
ui/tx/TokenTransfer.tsx
View file @
5c869f12
import
{
Flex
,
Icon
,
Text
}
from
'
@chakra-ui/react
'
;
import
{
Flex
,
Icon
,
Text
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
rightArrowIcon
from
'
icons/arrows/
righ
t.svg
'
;
import
rightArrowIcon
from
'
icons/arrows/
eas
t.svg
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
{
space
}
from
'
lib/html-entities
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
Token
from
'
ui/shared/Token
'
;
import
Token
from
'
ui/shared/Token
'
;
...
...
ui/tx/internals/TxInternalsTableItem.tsx
View file @
5c869f12
import
{
Tr
,
Td
,
Tag
,
Icon
,
Box
}
from
'
@chakra-ui/react
'
;
import
{
Tr
,
Td
,
Tag
,
Icon
,
Box
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
rightArrowIcon
from
'
icons/arrows/
righ
t.svg
'
;
import
rightArrowIcon
from
'
icons/arrows/
eas
t.svg
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
Address
from
'
ui/shared/address/Address
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressIcon
from
'
ui/shared/address/AddressIcon
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
import
AddressLink
from
'
ui/shared/address/AddressLink
'
;
...
...
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