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
d44c84a0
Commit
d44c84a0
authored
May 09, 2024
by
tom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
full success result screen
parent
f8d8e686
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
68 additions
and
15 deletions
+68
-15
PublicTagsSubmitResult.tsx
ui/publicTags/submit/PublicTagsSubmitResult.tsx
+8
-4
mocks.ts
ui/publicTags/submit/mocks.ts
+14
-8
PublicTagsSubmitResultSuccess.tsx
...ublicTags/submit/result/PublicTagsSubmitResultSuccess.tsx
+46
-3
No files found.
ui/publicTags/submit/PublicTagsSubmitResult.tsx
View file @
d44c84a0
import
{
Alert
,
Box
,
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
{
Alert
,
Box
,
Button
,
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
FormSubmitResult
}
from
'
./types
'
;
import
type
{
FormSubmitResult
}
from
'
./types
'
;
import
{
route
}
from
'
nextjs-routes
'
;
import
makePrettyLink
from
'
lib/makePrettyLink
'
;
import
makePrettyLink
from
'
lib/makePrettyLink
'
;
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
import
LinkExternal
from
'
ui/shared/LinkExternal
'
;
...
@@ -26,7 +28,7 @@ const PublicTagsSubmitResult = ({ data }: Props) => {
...
@@ -26,7 +28,7 @@ const PublicTagsSubmitResult = ({ data }: Props) => {
)
}
)
}
<
Box
as=
"h2"
textStyle=
"h4"
>
Company info
</
Box
>
<
Box
as=
"h2"
textStyle=
"h4"
>
Company info
</
Box
>
<
Grid
rowGap=
{
3
}
columnGap=
{
6
}
gridTemplateColumns=
"1
85
px 1fr"
mt=
{
6
}
>
<
Grid
rowGap=
{
3
}
columnGap=
{
6
}
gridTemplateColumns=
"1
70
px 1fr"
mt=
{
6
}
>
<
GridItem
>
Your name
</
GridItem
>
<
GridItem
>
Your name
</
GridItem
>
<
GridItem
>
{
data
[
0
].
payload
.
requesterName
}
</
GridItem
>
<
GridItem
>
{
data
[
0
].
payload
.
requesterName
}
</
GridItem
>
<
GridItem
>
Email
</
GridItem
>
<
GridItem
>
Email
</
GridItem
>
...
@@ -49,8 +51,10 @@ const PublicTagsSubmitResult = ({ data }: Props) => {
...
@@ -49,8 +51,10 @@ const PublicTagsSubmitResult = ({ data }: Props) => {
<
Box
as=
"h2"
textStyle=
"h4"
mt=
{
8
}
mb=
{
5
}
>
Public tags/labels
</
Box
>
<
Box
as=
"h2"
textStyle=
"h4"
mt=
{
8
}
mb=
{
5
}
>
Public tags/labels
</
Box
>
{
hasErrors
?
<
PublicTagsSubmitResultWithErrors
data=
{
data
}
/>
:
<
PublicTagsSubmitResultSuccess
data=
{
data
}
/>
}
{
hasErrors
?
<
PublicTagsSubmitResultWithErrors
data=
{
data
}
/>
:
<
PublicTagsSubmitResultSuccess
data=
{
data
}
/>
}
<
Button
size=
"lg"
mt=
{
8
}
as=
"a"
href=
{
route
({
pathname
:
'
/public-tags/submit
'
})
}
>
Add new tag
</
Button
>
</
div
>
</
div
>
);
);
};
};
export
default
PublicTagsSubmitResult
;
export
default
React
.
memo
(
PublicTagsSubmitResult
)
;
ui/publicTags/submit/mocks.ts
View file @
d44c84a0
...
@@ -4,24 +4,30 @@ export const item1: FormSubmitResultItem = {
...
@@ -4,24 +4,30 @@ export const item1: FormSubmitResultItem = {
error
:
null
,
error
:
null
,
payload
:
{
payload
:
{
addresses
:
[
addresses
:
[
{
{
hash
:
'
0xa8FCe579a11E551635b9c9CB915BEcd873C51254
'
},
hash
:
'
0xa8FCe579a11E551635b9c9CB915BEcd873C51254
'
,
{
hash
:
'
0xa8FCe579a11E551635b9c9CB915BEcd873C51255
'
},
},
{
hash
:
'
0xa8FCe579a11E551635b9c9CB915BEcd873C51256
'
},
{
hash
:
'
0xa8FCe579a11E551635b9c9CB915BEcd873C51257
'
},
],
],
tags
:
[
tags
:
[
{
{
name
:
'
hello
'
,
name
:
'
hello
'
,
type
:
{
type
:
{
label
:
'
name
'
,
value
:
'
name
'
},
label
:
'
name
'
,
value
:
'
name
'
,
},
url
:
'
https://ohhhh.me
'
,
url
:
'
https://ohhhh.me
'
,
tooltipDescription
:
'
hello again
'
,
tooltipDescription
:
'
hello again
'
,
bgColor
:
'
add
'
,
bgColor
:
'
add
'
,
textColor
:
'
00aa11
'
,
textColor
:
'
00aa11
'
,
},
},
{
name
:
'
hello it is me.. i was wondering if after all these years you would like to meet
'
,
type
:
{
label
:
'
generic
'
,
value
:
'
generic
'
},
url
:
undefined
,
tooltipDescription
:
undefined
,
bgColor
:
undefined
,
textColor
:
undefined
,
},
],
],
requesterName
:
'
tomm
'
,
requesterName
:
'
tomm
asdf jalskdfj asdflkjkas lasdfkj
'
,
requesterEmail
:
'
tom@ohhhh.me
'
,
requesterEmail
:
'
tom@ohhhh.me
'
,
companyName
:
'
OHHHH
'
,
companyName
:
'
OHHHH
'
,
companyWebsite
:
'
https://ohhhh.me
'
,
companyWebsite
:
'
https://ohhhh.me
'
,
...
...
ui/publicTags/submit/result/PublicTagsSubmitResultSuccess.tsx
View file @
d44c84a0
import
{
Box
}
from
'
@chakra-ui/react
'
;
import
{
Box
,
Flex
,
Grid
,
GridItem
}
from
'
@chakra-ui/react
'
;
import
React
from
'
react
'
;
import
React
from
'
react
'
;
import
type
{
FormSubmitResult
}
from
'
../types
'
;
import
type
{
FormSubmitResult
}
from
'
../types
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
AddressEntity
from
'
ui/shared/entities/address/AddressEntity
'
;
import
EntityTag
from
'
ui/shared/EntityTags/EntityTag
'
;
interface
Props
{
interface
Props
{
data
:
FormSubmitResult
;
data
:
FormSubmitResult
;
}
}
const
PublicTagsSubmitResultSuccess
=
(
props
:
Props
)
=>
{
const
PublicTagsSubmitResultSuccess
=
(
props
:
Props
)
=>
{
return
<
Box
>
{
props
.
data
.
length
}
</
Box
>;
const
isMobile
=
useIsMobile
();
return
(
<
Grid
gridTemplateColumns=
{
{
base
:
'
1fr
'
,
lg
:
'
1fr 1fr
'
}
}
rowGap=
{
3
}
columnGap=
{
3
}
>
<
GridItem
>
<
Box
fontSize=
"sm"
color=
"text_secondary"
fontWeight=
{
500
}
>
Smart contract / Address (0x...)
</
Box
>
<
Flex
flexDir=
"column"
rowGap=
{
3
}
mt=
{
2
}
>
{
props
.
data
.
map
((
item
)
=>
item
.
payload
.
addresses
)
.
flat
()
.
map
((
item
)
=>
<
AddressEntity
key=
{
item
.
hash
}
address=
{
item
}
noIcon
truncation=
{
isMobile
?
'
constant
'
:
'
dynamic
'
}
/>)
}
</
Flex
>
</
GridItem
>
<
GridItem
>
<
Box
fontSize=
"sm"
color=
"text_secondary"
fontWeight=
{
500
}
>
Tag
</
Box
>
<
Flex
rowGap=
{
2
}
columnGap=
{
2
}
mt=
{
2
}
justifyContent=
"flex-start"
flexWrap=
"wrap"
>
{
props
.
data
.
map
((
item
)
=>
item
.
payload
.
tags
)
.
flat
()
.
map
((
item
)
=>
(
<
EntityTag
key=
{
item
.
name
}
truncate
data=
{
{
name
:
item
.
name
,
tagType
:
item
.
type
.
value
,
meta
:
{
bgColor
:
item
.
bgColor
?
`#${ item.bgColor }`
:
undefined
,
textColor
:
item
.
textColor
?
`#${ item.textColor }`
:
undefined
,
tooltipDescription
:
item
.
tooltipDescription
,
tagUrl
:
item
.
url
,
},
slug
:
item
.
name
,
ordinal
:
0
,
}
}
/>
))
}
</
Flex
>
</
GridItem
>
</
Grid
>
);
};
};
export
default
PublicTagsSubmitResultSuccess
;
export
default
React
.
memo
(
PublicTagsSubmitResultSuccess
)
;
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