Skip to content
This repository has been archived by the owner on Mar 7, 2023. It is now read-only.

Airdrop feature #88

Merged
merged 47 commits into from
Jan 20, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
4ff4c29
feat: get tokens markdown
JayJay1024 Jan 18, 2022
97a80d2
feat: log in github btn
JayJay1024 Jan 18, 2022
dce795e
Airdrop api
fewensa Jan 18, 2022
6e2306f
Fix wrong secret key
fewensa Jan 18, 2022
1c739df
Api redirect
fewensa Jan 18, 2022
0e4e24b
Fix redirect
fewensa Jan 18, 2022
1cffffa
Fix origin
fewensa Jan 18, 2022
5eabdaf
fear(airdrop): comfirm modal btn
JayJay1024 Jan 18, 2022
2dc4971
feat(airdrop): comfirm modal title
JayJay1024 Jan 18, 2022
40fa9f1
fear(airdrop): loading modal
JayJay1024 Jan 18, 2022
da99229
feat(airdrop): not available claim
JayJay1024 Jan 18, 2022
7d6d9f0
feat(airdrop): destination
JayJay1024 Jan 18, 2022
54c2754
feat(airdrop): comfirm and claim
JayJay1024 Jan 18, 2022
e71f2ed
feat(airdrop): congratulation
JayJay1024 Jan 18, 2022
7bd11ca
feat: login action
JayJay1024 Jan 18, 2022
373657d
Merge branch 'jay-airdrop-claim' into airdrop-api
JayJay1024 Jan 18, 2022
b797e0d
fix: build failed
JayJay1024 Jan 18, 2022
1750866
fix: svg file name
JayJay1024 Jan 18, 2022
2340004
fix: cant resolve some svg file
JayJay1024 Jan 18, 2022
c6077e0
chore: check get user info
JayJay1024 Jan 19, 2022
f21d23b
chore: check authorize
JayJay1024 Jan 19, 2022
5a94919
chore: update link
JayJay1024 Jan 19, 2022
257a173
chore: update modals
JayJay1024 Jan 19, 2022
cfa5596
chore: beta check
JayJay1024 Jan 19, 2022
c3db2dc
chore: check transfer
JayJay1024 Jan 19, 2022
6d1c7aa
chore: error or warning notice
JayJay1024 Jan 19, 2022
39b43f9
chore: optimize oauth process
JayJay1024 Jan 19, 2022
3226faf
chore: remove unuse log
JayJay1024 Jan 19, 2022
1dbdf42
chore: update oauth header
JayJay1024 Jan 19, 2022
8f84432
test
fewensa Jan 19, 2022
198ab50
Merge remote-tracking branch 'origin/airdrop-api' into airdrop-api
fewensa Jan 19, 2022
a3b2bbf
chore: check catch error response
JayJay1024 Jan 19, 2022
7ae270a
Merge branch 'airdrop-api' of github.com:darwinia-network/crab-docs i…
JayJay1024 Jan 19, 2022
47ba0d9
chore: update claim fail case
JayJay1024 Jan 19, 2022
954b342
fix: claim fail notice
JayJay1024 Jan 19, 2022
dbab9fe
Query airdrop state
fewensa Jan 20, 2022
8834ef8
Merge branch 'airdrop-api' of https://github.com/darwinia-network/cra…
fewensa Jan 20, 2022
aeecaa0
Try fix
fewensa Jan 20, 2022
c7cf706
Add state for no login
fewensa Jan 20, 2022
74a4af1
Change secrets
fewensa Jan 20, 2022
12b5b91
fix ci
fewensa Jan 20, 2022
c9fe84f
chore: check state api
JayJay1024 Jan 20, 2022
e4967d7
chore: update user state check
JayJay1024 Jan 20, 2022
be10a9f
chore: update airdrop amount
JayJay1024 Jan 20, 2022
5af5151
chore: remove unuse and update login action
JayJay1024 Jan 20, 2022
97c6cca
chore: update grant origin
JayJay1024 Jan 20, 2022
96e222a
chore: revert grant origin
JayJay1024 Jan 20, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
feat(airdrop): destination
  • Loading branch information
JayJay1024 committed Jan 18, 2022
commit 7d6d9f0bf32901c6aa94a6fe07c20f61b9e567d9
6 changes: 3 additions & 3 deletions src/component/ClaimAirdrop/SubComponent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const SnapshotDataSection = ({
);

export const DestinationSection = ({
onAddressChange=(address)=>console.log(address),
onAddressChange=(e)=>console.log(e.target.value),
isValidAddress=true,
isNothingToClaim=false,
isClaimed=false,
Expand Down Expand Up @@ -133,11 +133,11 @@ export const DestinationSection = ({
return (
<div className={styles.destinationSection}>
<h5>Destination</h5>
<input onChange={onAddressChange} />
<input placeholder='Please enter your Crab Smart Address which starts with 0x' onChange={onAddressChange} />
{isValidAddress ? (
<span>Please enter your Crab Smart Address to claim token CRAB, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
) : (
<span>Please enter a valid Crab Smart Address, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
<span className={styles.warning}>Please enter a valid Crab Smart Address, learn more about Crab Smart Address, please refer <a href='#'>here</a>.</span>
)}
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/component/ClaimAirdrop/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const ClaimAirdrop: React.FC<Props> = ({ className }) => {
>
<Space direction='vertical' size='middle' style={{ width: '100%' }}>
<SnapshotDataSection />
<DestinationSection isNothingToClaim={true} />
<DestinationSection isValidAddress={false} />
</Space>
</ComfirmModal>
<LoadingModal
Expand Down
35 changes: 35 additions & 0 deletions src/component/ClaimAirdrop/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,10 +204,45 @@
}

.destinationSection {
display: flex;
flex-direction: column;

>p {
font-weight: bold;
font-size: small;
margin: 0;
text-align: center;
}

>input {
border: 1px solid #CCCCCC;
border-radius: 10px;
height: 36px;
padding: 0 12px;
margin-bottom: 6px;
box-shadow: inset 0 0 6px #CCCCCC;

&:hover {
box-shadow: 0 0 2px rgba(228, 26, 112, 0.9);
border: 1px solid rgba(228, 26, 112, 0.9);
}

&:focus-visible {
outline-color: rgba(228, 26, 112, 0.9);
}
}

>span {
>a {
text-decoration: underline;
}

&.warning {
color: #FF0000;

>a {
color: #000000;
}
}
}
}