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
487dfb33
Commit
487dfb33
authored
Oct 16, 2024
by
Max Alekseenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix merge
parent
4768d08d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
RewardsLoginModal.tsx
ui/rewards/RewardsLoginModal.tsx
+2
-2
LoginStepContent.tsx
ui/rewards/steps/LoginStepContent.tsx
+6
-6
No files found.
ui/rewards/RewardsLoginModal.tsx
View file @
487dfb33
...
...
@@ -3,13 +3,13 @@ import React, { useCallback, useEffect } from 'react';
import
{
useRewardsContext
}
from
'
lib/contexts/rewards
'
;
import
useIsMobile
from
'
lib/hooks/useIsMobile
'
;
import
useWallet
from
'
ui/snippets/walletMenu
/useWallet
'
;
import
useWallet
from
'
lib/web3
/useWallet
'
;
import
CongratsStepContent
from
'
./steps/CongratsStepContent
'
;
import
LoginStepContent
from
'
./steps/LoginStepContent
'
;
const
RewardsLoginModal
=
()
=>
{
const
{
is
Modal
Open
:
isWalletModalOpen
}
=
useWallet
({
source
:
'
Merits
'
});
const
{
isOpen
:
isWalletModalOpen
}
=
useWallet
({
source
:
'
Merits
'
});
const
isMobile
=
useIsMobile
();
const
{
isLoginModalOpen
,
closeLoginModal
}
=
useRewardsContext
();
...
...
ui/rewards/steps/LoginStepContent.tsx
View file @
487dfb33
...
...
@@ -4,9 +4,9 @@ import type { ChangeEvent } from 'react';
import
React
,
{
useCallback
,
useState
,
useEffect
}
from
'
react
'
;
import
*
as
cookies
from
'
lib/cookies
'
;
import
useWallet
from
'
lib/web3/useWallet
'
;
import
InputPlaceholder
from
'
ui/shared/InputPlaceholder
'
;
import
LinkExternal
from
'
ui/shared/links/LinkExternal
'
;
import
useWallet
from
'
ui/snippets/walletMenu/useWallet
'
;
import
useLogin
from
'
../useLogin
'
;
...
...
@@ -17,7 +17,7 @@ type Props = {
const
LoginStepContent
=
({
goNext
,
closeModal
}:
Props
)
=>
{
const
router
=
useRouter
();
const
{
connect
,
is
Wallet
Connected
}
=
useWallet
({
source
:
'
Merits
'
});
const
{
connect
,
isConnected
}
=
useWallet
({
source
:
'
Merits
'
});
const
savedRefCode
=
cookies
.
get
(
cookies
.
NAMES
.
REWARDS_REFERRAL_CODE
);
const
[
isSwitchChecked
,
setIsSwitchChecked
]
=
useBoolean
(
Boolean
(
savedRefCode
));
const
[
isLoading
,
setIsLoading
]
=
useBoolean
(
false
);
...
...
@@ -62,7 +62,7 @@ const LoginStepContent = ({ goNext, closeModal }: Props) => {
More about Blockscout Merits
</
LinkExternal
>
</
Box
>
{
is
Wallet
Connected
&&
(
{
isConnected
&&
(
<>
<
Box
w=
"full"
mb=
{
6
}
borderTop=
"1px solid"
borderColor=
{
dividerColor
}
/>
<
Flex
w=
"full"
alignItems=
"center"
justifyContent=
"space-between"
>
...
...
@@ -93,12 +93,12 @@ const LoginStepContent = ({ goNext, closeModal }: Props) => {
variant=
"solid"
colorScheme=
"blue"
w=
"full"
mt=
{
is
Wallet
Connected
?
6
:
0
}
mt=
{
isConnected
?
6
:
0
}
mb=
{
4
}
onClick=
{
is
Wallet
Connected
?
handleLogin
:
connect
}
onClick=
{
isConnected
?
handleLogin
:
connect
}
isLoading=
{
isLoading
}
>
{
is
Wallet
Connected
?
'
Get started
'
:
'
Connect wallet
'
}
{
isConnected
?
'
Get started
'
:
'
Connect wallet
'
}
</
Button
>
<
Text
fontSize=
"sm"
color=
{
useColorModeValue
(
'
blackAlpha.500
'
,
'
whiteAlpha.500
'
)
}
textAlign=
"center"
>
Already registered for Blockscout Merits on another network or chain? Connect the same wallet here.
...
...
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