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
805ad3de
Commit
805ad3de
authored
Oct 30, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
post-review changes
parent
3451a0a4
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
27 additions
and
27 deletions
+27
-27
ENVS.md
docs/ENVS.md
+1
-1
merits.svg
icons/merits.svg
+3
-3
merits_slim.svg
icons/merits_slim.svg
+3
-3
merits_with_dot.svg
icons/merits_with_dot.svg
+3
-3
merits_with_dot_slim.svg
icons/merits_with_dot_slim.svg
+3
-3
rewards.tsx
lib/contexts/rewards.tsx
+2
-2
RewardsDashboard.tsx
ui/pages/RewardsDashboard.tsx
+4
-4
RewardsButton.tsx
ui/rewards/RewardsButton.tsx
+1
-1
RewardsNavLink.tsx
ui/rewards/RewardsNavLink.tsx
+1
-1
RewardsReadOnlyInputWithCopy.tsx
ui/rewards/RewardsReadOnlyInputWithCopy.tsx
+2
-2
DailyRewardClaimButton.tsx
ui/rewards/dashboard/DailyRewardClaimButton.tsx
+2
-2
CongratsStepContent.tsx
ui/rewards/login/steps/CongratsStepContent.tsx
+2
-2
No files found.
docs/ENVS.md
View file @
805ad3de
...
@@ -801,7 +801,7 @@ This feature enables Blockscout Merits program. It requires that the [My account
...
@@ -801,7 +801,7 @@ This feature enables Blockscout Merits program. It requires that the [My account
| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| Variable | Type| Description | Compulsoriness | Default value | Example value | Version |
| --- | --- | --- | --- | --- | --- | --- |
| --- | --- | --- | --- | --- | --- | --- |
| NEXT_PUBLIC_REWARDS_SERVICE_API_HOST |
`string`
| API
url
| - | - |
`https://example.com`
| v1.36.0+ |
| NEXT_PUBLIC_REWARDS_SERVICE_API_HOST |
`string`
| API
URL
| - | - |
`https://example.com`
| v1.36.0+ |
## External services configuration
## External services configuration
...
...
icons/merits.svg
View file @
805ad3de
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
24 24
"
fill=
"none"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
30 30
"
fill=
"none"
>
<path
d=
"M1
0.229 6.946c.401 0 .727.329.727.735v.636a.731.731 0 0 1-.727.735h-.353a.731.731 0 0 0-.727.735v6.532a.731.731 0 0 1-.727.735h-.695A.731.731 0 0 1 7 16.32V9.787c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.736v-.635c0-.406.325-.735.727-.735h.694ZM14.54 6.946c.403 0 .728.329.728.735v.635c0 .407.326.736.727.736h.278c.401 0 .727.329.727.735v6.532a.731.731 0 0 1-.727.735h-.695a.731.731 0 0 1-.727-.735V9.787a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.735V7.68c0-.406.326-.735.727-.735h.695ZM12.362 10.977c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.736v-2.62c0-.407.326-.736.728-.736
h.694Z"
fill=
"currentColor"
/>
<path
d=
"M1
3.229 9.946c.401 0 .727.329.727.735v.636a.731.731 0 0 1-.727.735h-.353a.731.731 0 0 0-.727.735v6.532a.731.731 0 0 1-.727.735h-.695A.731.731 0 0 1 10 19.32v-6.532c0-.406.326-.735.727-.735h.352c.402 0 .728-.33.728-.736v-.635a.73.73 0 0 1 .727-.735h.694Zm4.311 0c.402 0 .728.329.728.735v.636c0 .405.326.735.727.735h.278c.401 0 .727.329.727.735v6.532a.731.731 0 0 1-.727.735h-.695a.731.731 0 0 1-.727-.735v-6.532a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635c0-.406.326-.735.727-.735h.695Zm-2.178 4.031c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.735v-2.622c0-.406.326-.735.728-.735
h.694Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1
2.894 1.213a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 2 7.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 22 16.935v-9.87c0-.766-.428-1.466-1.106-1.808l-8-4.044ZM4 7
.065l8-4.043 8 4.043v9.87l-8 4.043-8-4.043v-9.87Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1
5.894 4.213a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 5 10.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 25 19.935v-9.87c0-.766-.428-1.466-1.106-1.808l-8-4.044ZM7 10
.065l8-4.043 8 4.043v9.87l-8 4.043-8-4.043v-9.87Z"
fill=
"currentColor"
/>
</svg>
</svg>
icons/merits_slim.svg
View file @
805ad3de
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
30 30
"
fill=
"none"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
24 24
"
fill=
"none"
>
<path
d=
"M1
3.229 9.946c.401 0 .727.329.727.735v.636a.731.731 0 0 1-.727.735h-.353a.731.731 0 0 0-.727.735v6.532a.731.731 0 0 1-.727.735h-.695A.731.731 0 0 1 10 19.32v-6.532c0-.406.326-.735.727-.735h.352c.402 0 .728-.33.728-.736v-.635a.73.73 0 0 1 .727-.735h.694ZM17.54 9.946c.402 0 .728.329.728.735v.636c0 .405.326.735.727.735h.278c.401 0 .727.329.727.735v6.532a.731.731 0 0 1-.727.735h-.695a.731.731 0 0 1-.727-.735v-6.532a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635c0-.406.326-.735.727-.735h.695ZM15.362 13.977c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.735v-2.622c0-.406.326-.735.728-.735
h.694Z"
fill=
"currentColor"
/>
<path
d=
"M1
0.229 6.946c.401 0 .727.329.727.735v.636a.731.731 0 0 1-.727.735h-.353a.731.731 0 0 0-.727.735v6.532a.731.731 0 0 1-.727.735h-.695A.731.731 0 0 1 7 16.32V9.787c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.736v-.635a.73.73 0 0 1 .727-.735h.694Zm4.311 0a.73.73 0 0 1 .728.735v.635c0 .407.326.736.727.736h.278c.401 0 .727.329.727.735v6.532a.731.731 0 0 1-.727.735h-.695a.731.731 0 0 1-.727-.735V9.787a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.735V7.68c0-.406.326-.735.727-.735h.695Zm-2.178 4.031c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.736v-2.62c0-.407.326-.736.728-.736
h.694Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1
5.894 4.213a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 5 10.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 25 19.935v-9.87c0-.766-.428-1.466-1.106-1.808l-8-4.044ZM7 10
.065l8-4.043 8 4.043v9.87l-8 4.043-8-4.043v-9.87Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"M1
2.894 1.213a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 2 7.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 22 16.935v-9.87c0-.766-.428-1.466-1.106-1.808l-8-4.044ZM4 7
.065l8-4.043 8 4.043v9.87l-8 4.043-8-4.043v-9.87Z"
fill=
"currentColor"
/>
</svg>
</svg>
icons/merits_with_dot.svg
View file @
805ad3de
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
24 24
"
fill=
"none"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
30 30
"
fill=
"none"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"m1
6.133 2.85-3.239-1.637a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 2 7.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 22 16.935V8.9a5.022 5.022 0 0 1-2 0v8.035l-8 4.043-8-4.043v-9.87l8-4.043 4.123 2.083a5.02 5.02 0 0 1 .01-2.255Zm-5.177 4.83a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.635a.731.731 0 0 1-.727.736h-.353A.731.731 0 0 0 7 9.787v6.532c0 .406.326.735.727.735h.695c.401 0 .727-.329.727-.735V9.787c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.735V7.68Zm4.312 0a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636c0 .406.326.735.727.735h.278c.401 0 .727.329.727.735v6.532c0 .406.326.735.727.735h.695c.401 0 .727-.329.727-.735V9.787a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635Zm-2.906 3.297c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.736v-2.62c0-.407.326-.736.728-.736
h.694Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"m1
9.133 5.85-3.239-1.637a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 5 10.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 25 19.935V11.9a5.022 5.022 0 0 1-2 0v8.035l-8 4.043-8-4.043v-9.87l8-4.043 4.123 2.083a5.02 5.02 0 0 1 .01-2.255Zm-5.177 4.83a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636a.731.731 0 0 1-.728.735h-.352a.731.731 0 0 0-.727.735v6.532c0 .406.326.735.727.735h.695a.731.731 0 0 0 .727-.735v-6.532c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.736v-.635Zm4.312 0a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636c0 .406.326.735.727.735h.278a.73.73 0 0 1 .727.735v6.532c0 .406.326.735.727.735h.695a.731.731 0 0 0 .727-.735v-6.532a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635Zm-2.906 3.297c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.735v-2.622c0-.406.326-.735.728-.735
h.694Z"
fill=
"currentColor"
/>
<circle
cx=
"2
1"
cy=
"4
"
r=
"3"
fill=
"#E53E3E"
/>
<circle
cx=
"2
4"
cy=
"7
"
r=
"3"
fill=
"#E53E3E"
/>
</svg>
</svg>
icons/merits_with_dot_slim.svg
View file @
805ad3de
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
30 30
"
fill=
"none"
>
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0
24 24
"
fill=
"none"
>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"m1
9.133 5.85-3.239-1.637a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 5 10.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 25 19.935V11.9a5.022 5.022 0 0 1-2 0v8.035l-8 4.043-8-4.043v-9.87l8-4.043 4.123 2.083a5.02 5.02 0 0 1 .01-2.255Zm-5.177 4.83a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636a.731.731 0 0 1-.728.735h-.352a.731.731 0 0 0-.727.735v6.532c0 .406.326.735.727.735h.695c.401 0 .727-.329.727-.735v-6.532c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.736v-.635Zm4.312 0a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636c0 .406.326.735.727.735h.278c.402 0 .727.329.727.735v6.532c0 .406.326.735.727.735h.695c.401 0 .727-.329.727-.735v-6.532a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635Zm-2.906 3.297c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.735v-2.622c0-.406.326-.735.728-.735
h.694Z"
fill=
"currentColor"
/>
<path
fill-rule=
"evenodd"
clip-rule=
"evenodd"
d=
"m1
6.133 2.85-3.239-1.637a1.98 1.98 0 0 0-1.788 0l-8 4.044A2.024 2.024 0 0 0 2 7.065v9.87c0 .766.428 1.466 1.106 1.808l8 4.044a1.981 1.981 0 0 0 1.788 0l8-4.044A2.024 2.024 0 0 0 22 16.935V8.9a5.022 5.022 0 0 1-2 0v8.035l-8 4.043-8-4.043v-9.87l8-4.043 4.123 2.083a5.02 5.02 0 0 1 .01-2.255Zm-5.177 4.83a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.635a.731.731 0 0 1-.727.736h-.353A.731.731 0 0 0 7 9.787v6.532c0 .406.326.735.727.735h.695a.731.731 0 0 0 .727-.735V9.787c0-.406.326-.735.727-.735h.353c.401 0 .727-.33.727-.735V7.68Zm4.312 0a.731.731 0 0 0-.727-.734h-.695a.731.731 0 0 0-.727.735v.636c0 .406.326.735.727.735h.278c.401 0 .727.329.727.735v6.532c0 .406.326.735.727.735h.695a.731.731 0 0 0 .727-.735V9.787a.731.731 0 0 0-.727-.735h-.278a.731.731 0 0 1-.727-.736v-.635Zm-2.906 3.297c.402 0 .727.33.727.735v2.622a.731.731 0 0 1-.727.735h-.694a.731.731 0 0 1-.728-.736v-2.62c0-.407.326-.736.728-.736
h.694Z"
fill=
"currentColor"
/>
<circle
cx=
"2
4"
cy=
"7
"
r=
"3"
fill=
"#E53E3E"
/>
<circle
cx=
"2
1"
cy=
"4
"
r=
"3"
fill=
"#E53E3E"
/>
</svg>
</svg>
lib/contexts/rewards.tsx
View file @
805ad3de
...
@@ -227,7 +227,7 @@ export function RewardsContextProvider({ children }: Props) {
...
@@ -227,7 +227,7 @@ export function RewardsContextProvider({ children }: Props) {
saveApiToken
(
loginResponse
.
token
);
saveApiToken
(
loginResponse
.
token
);
return
{
isNewUser
:
loginResponse
.
created
};
return
{
isNewUser
:
loginResponse
.
created
};
}
catch
(
_error
)
{
}
catch
(
_error
)
{
errorToast
(
_error
as
ResourceError
<
{
message
:
string
}
>
);
errorToast
(
_error
);
throw
_error
;
throw
_error
;
}
}
},
[
apiFetch
,
address
,
signMessageAsync
,
errorToast
,
saveApiToken
,
checkUserQuery
]);
},
[
apiFetch
,
address
,
signMessageAsync
,
errorToast
,
saveApiToken
,
checkUserQuery
]);
...
@@ -242,7 +242,7 @@ export function RewardsContextProvider({ children }: Props) {
...
@@ -242,7 +242,7 @@ export function RewardsContextProvider({ children }: Props) {
},
},
})
as
RewardsUserDailyClaimResponse
;
})
as
RewardsUserDailyClaimResponse
;
}
catch
(
_error
)
{
}
catch
(
_error
)
{
errorToast
(
_error
as
ResourceError
<
{
message
:
string
}
>
);
errorToast
(
_error
);
throw
_error
;
throw
_error
;
}
}
},
[
apiFetch
,
errorToast
,
fetchParams
]);
},
[
apiFetch
,
errorToast
,
fetchParams
]);
...
...
ui/pages/RewardsDashboard.tsx
View file @
805ad3de
...
@@ -7,7 +7,7 @@ import { apos } from 'lib/html-entities';
...
@@ -7,7 +7,7 @@ import { apos } from 'lib/html-entities';
import
DailyRewardClaimButton
from
'
ui/rewards/dashboard/DailyRewardClaimButton
'
;
import
DailyRewardClaimButton
from
'
ui/rewards/dashboard/DailyRewardClaimButton
'
;
import
RewardsDashboardCard
from
'
ui/rewards/dashboard/RewardsDashboardCard
'
;
import
RewardsDashboardCard
from
'
ui/rewards/dashboard/RewardsDashboardCard
'
;
import
RewardsDashboardCardValue
from
'
ui/rewards/dashboard/RewardsDashboardCardValue
'
;
import
RewardsDashboardCardValue
from
'
ui/rewards/dashboard/RewardsDashboardCardValue
'
;
import
Re
adOnlyInputWithCopy
from
'
ui/rewards/
ReadOnlyInputWithCopy
'
;
import
Re
wardsReadOnlyInputWithCopy
from
'
ui/rewards/Rewards
ReadOnlyInputWithCopy
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
PageTitle
from
'
ui/shared/Page/PageTitle
'
;
import
useRedirectForInvalidAuthToken
from
'
ui/snippets/auth/useRedirectForInvalidAuthToken
'
;
import
useRedirectForInvalidAuthToken
from
'
ui/snippets/auth/useRedirectForInvalidAuthToken
'
;
...
@@ -107,13 +107,13 @@ const RewardsDashboard = () => {
...
@@ -107,13 +107,13 @@ const RewardsDashboard = () => {
py=
{
{
base
:
4
,
md
:
0
}
}
py=
{
{
base
:
4
,
md
:
0
}
}
flexDirection=
{
{
base
:
'
column
'
,
md
:
'
row
'
}
}
flexDirection=
{
{
base
:
'
column
'
,
md
:
'
row
'
}
}
>
>
<
ReadOnlyInputWithCopy
<
Re
wardsRe
adOnlyInputWithCopy
label=
"Referral link"
label=
"Referral link"
value=
{
`https://eth.blockscout.com?ref=${ referralsQuery.data?.code }`
}
value=
{
referralsQuery
.
data
?.
link
||
''
}
isLoading=
{
referralsQuery
.
isPending
}
isLoading=
{
referralsQuery
.
isPending
}
flex=
{
2
}
flex=
{
2
}
/>
/>
<
ReadOnlyInputWithCopy
<
Re
wardsRe
adOnlyInputWithCopy
label=
"Referral code"
label=
"Referral code"
value=
{
referralsQuery
.
data
?.
code
||
''
}
value=
{
referralsQuery
.
data
?.
code
||
''
}
isLoading=
{
referralsQuery
.
isPending
}
isLoading=
{
referralsQuery
.
isPending
}
...
...
ui/rewards/RewardsButton.tsx
View file @
805ad3de
...
@@ -50,7 +50,7 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
...
@@ -50,7 +50,7 @@ const RewardsButton = ({ variant = 'header', size }: Props) => {
}
}
}
}
>
>
<
IconSvg
<
IconSvg
name=
{
dailyRewardQuery
.
data
?.
available
?
'
merits_with_dot
'
:
'
merits
'
}
name=
{
dailyRewardQuery
.
data
?.
available
?
'
merits_with_dot
_slim
'
:
'
merits_slim
'
}
boxSize=
{
variant
===
'
hero
'
?
6
:
5
}
boxSize=
{
variant
===
'
hero
'
?
6
:
5
}
flexShrink=
{
0
}
flexShrink=
{
0
}
/>
/>
...
...
ui/rewards/RewardsNavLink.tsx
View file @
805ad3de
...
@@ -77,7 +77,7 @@ const RewardsNavLink = ({ isCollapsed, onClick }: Props) => {
...
@@ -77,7 +77,7 @@ const RewardsNavLink = ({ isCollapsed, onClick }: Props) => {
margin=
{
0
}
margin=
{
0
}
>
>
<
HStack
spacing=
{
0
}
overflow=
"hidden"
>
<
HStack
spacing=
{
0
}
overflow=
"hidden"
>
<
NavLinkIcon
item=
{
{
icon
:
dailyRewardQuery
.
data
?.
available
?
'
merits_with_dot
_slim
'
:
'
merits_slim
'
}
as
NavItem
}
/>
<
NavLinkIcon
item=
{
{
icon
:
dailyRewardQuery
.
data
?.
available
?
'
merits_with_dot
'
:
'
merits
'
}
as
NavItem
}
/>
<
Text
{
...
styleProps
.
textProps
}
as=
"span"
ml=
{
3
}
>
<
Text
{
...
styleProps
.
textProps
}
as=
"span"
ml=
{
3
}
>
Merits
Merits
</
Text
>
</
Text
>
...
...
ui/rewards/ReadOnlyInputWithCopy.tsx
→
ui/rewards/Re
wardsRe
adOnlyInputWithCopy.tsx
View file @
805ad3de
...
@@ -11,7 +11,7 @@ type Props = {
...
@@ -11,7 +11,7 @@ type Props = {
isLoading
?:
boolean
;
isLoading
?:
boolean
;
};
};
const
ReadOnlyInputWithCopy
=
({
label
,
value
,
className
,
isLoading
}:
Props
)
=>
(
const
Re
wardsRe
adOnlyInputWithCopy
=
({
label
,
value
,
className
,
isLoading
}:
Props
)
=>
(
<
FormControl
variant=
"floating"
id=
{
label
}
className=
{
className
}
>
<
FormControl
variant=
"floating"
id=
{
label
}
className=
{
className
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
Skeleton
isLoaded=
{
!
isLoading
}
>
<
InputGroup
>
<
InputGroup
>
...
@@ -36,4 +36,4 @@ const ReadOnlyInputWithCopy = ({ label, value, className, isLoading }: Props) =>
...
@@ -36,4 +36,4 @@ const ReadOnlyInputWithCopy = ({ label, value, className, isLoading }: Props) =>
</
FormControl
>
</
FormControl
>
);
);
export
default
chakra
(
ReadOnlyInputWithCopy
);
export
default
chakra
(
Re
wardsRe
adOnlyInputWithCopy
);
ui/rewards/dashboard/DailyRewardClaimButton.tsx
View file @
805ad3de
...
@@ -37,7 +37,7 @@ const DailyRewardClaimButton = () => {
...
@@ -37,7 +37,7 @@ const DailyRewardClaimButton = () => {
const
formattedDate
=
dailyRewardQuery
.
data
.
reset_at
.
replace
(
'
'
,
'
T
'
).
replace
(
'
UTC
'
,
'
Z
'
);
const
formattedDate
=
dailyRewardQuery
.
data
.
reset_at
.
replace
(
'
'
,
'
T
'
).
replace
(
'
UTC
'
,
'
Z
'
);
const
target
=
new
Date
(
formattedDate
).
getTime
();
const
target
=
new
Date
(
formattedDate
).
getTime
();
let
interval
:
ReturnType
<
typeof
setTimeout
>
;
// eslint-disable-line prefer-const
let
interval
=
0
;
const
updateCountdown
=
(
target
:
number
)
=>
{
const
updateCountdown
=
(
target
:
number
)
=>
{
const
now
=
new
Date
().
getTime
();
const
now
=
new
Date
().
getTime
();
...
@@ -55,7 +55,7 @@ const DailyRewardClaimButton = () => {
...
@@ -55,7 +55,7 @@ const DailyRewardClaimButton = () => {
updateCountdown
(
target
);
updateCountdown
(
target
);
interval
=
setInterval
(()
=>
{
interval
=
window
.
setInterval
(()
=>
{
updateCountdown
(
target
);
updateCountdown
(
target
);
},
SECOND
);
},
SECOND
);
...
...
ui/rewards/login/steps/CongratsStepContent.tsx
View file @
805ad3de
...
@@ -7,7 +7,7 @@ import { useRewardsContext } from 'lib/contexts/rewards';
...
@@ -7,7 +7,7 @@ import { useRewardsContext } from 'lib/contexts/rewards';
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
IconSvg
from
'
ui/shared/IconSvg
'
;
import
MeritsIcon
from
'
../../MeritsIcon
'
;
import
MeritsIcon
from
'
../../MeritsIcon
'
;
import
Re
adOnlyInputWithCopy
from
'
../../
ReadOnlyInputWithCopy
'
;
import
Re
wardsReadOnlyInputWithCopy
from
'
../../Rewards
ReadOnlyInputWithCopy
'
;
type
Props
=
{
type
Props
=
{
isReferral
:
boolean
;
isReferral
:
boolean
;
...
@@ -89,7 +89,7 @@ const CongratsStepContent = ({ isReferral }: Props) => {
...
@@ -89,7 +89,7 @@ const CongratsStepContent = ({ isReferral }: Props) => {
</
Skeleton
>
</
Skeleton
>
{
'
'
}
bonus on all merits earned by your referrals
{
'
'
}
bonus on all merits earned by your referrals
</
Text
>
</
Text
>
<
ReadOnlyInputWithCopy
<
Re
wardsRe
adOnlyInputWithCopy
label=
"Referral link"
label=
"Referral link"
value=
{
refLink
}
value=
{
refLink
}
isLoading=
{
referralsQuery
.
isLoading
}
isLoading=
{
referralsQuery
.
isLoading
}
...
...
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