-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* #341 frontend for converting csov to sov and redeeming rbtc * changed node url to more powerful ones (#348) * csov-2 added to my wallet; hide top-up history (#356) * fixes pre-order banner for windows users * fixing banner * fixing banner * Removed pre-order banner (#385) * Merge remote-tracking branch 'origin/master' into feat/341-convert-csov # Conflicts: # src/app/components/UserAssets/index.tsx * Gas limits for csov claim and rbtc redeeming
- Loading branch information
1 parent
9102ff9
commit d68a176
Showing
31 changed files
with
6,126 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module.exports = { | ||
"stories": [ | ||
"../src/**/*.stories.mdx", | ||
"../src/**/*.stories.@(js|jsx|ts|tsx)" | ||
], | ||
"addons": [ | ||
"@storybook/addon-links", | ||
"@storybook/addon-essentials", | ||
"@storybook/preset-create-react-app" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
|
||
export const parameters = { | ||
actions: { argTypesRegex: "^on[A-Z].*" }, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.button { | ||
background: #FEC004; | ||
border: 1px solid #FEC004; | ||
color: #000000; | ||
border-radius: 10px; | ||
transition: background 0.3s, color 0.3s, border 0.3s; | ||
cursor: pointer; | ||
height: 50px; | ||
padding: 0 25px; | ||
font-size: 20px; | ||
font-weight: 700; | ||
line-height: 24px; | ||
} | ||
|
||
.button:hover { | ||
background: rgb(254, 192, 4, 0.8); | ||
} | ||
|
||
.button.inverted { | ||
background: #000000; | ||
color: #FEC004; | ||
} | ||
|
||
.button.inverted:hover { | ||
background: rgba(254, 192, 4, 0.25); | ||
} | ||
|
||
.button.inverted:active { | ||
background: rgba(254, 192, 4, 0.5); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
import { Button } from './index'; | ||
|
||
export const Primary = () => <Button text="Button" onClick={() => {}} />; | ||
export const Secondary = () => <Button text="Button" loading disabled onClick={() => {}} />; | ||
|
||
export default { | ||
title: 'Form Elements', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react'; | ||
import classNames from 'classnames'; | ||
import styles from './index.module.css'; | ||
|
||
type ButtonType = 'button' | 'submit' | 'reset'; | ||
|
||
interface Props { | ||
text: React.ReactNode; | ||
onClick?: () => void; | ||
inverted?: boolean; | ||
type?: ButtonType; | ||
disabled?: boolean; | ||
loading?: boolean; | ||
className?: string; | ||
} | ||
export function Button({ text, inverted, loading, ...props }: Props) { | ||
return ( | ||
<button | ||
{...props} | ||
className={classNames( | ||
styles.button, | ||
props.className, | ||
inverted && styles.inverted, | ||
)} | ||
> | ||
{text} | ||
</button> | ||
); | ||
} | ||
|
||
Button.defaultProps = { | ||
type: 'button', | ||
inverted: false, | ||
onClick: () => {}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
import React, { useState } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { Button } from '@blueprintjs/core'; | ||
import { translations } from 'locales/i18n'; | ||
import { ClaimDialog } from './ClaimDialiog'; | ||
import { useCacheCallWithValue } from '../../../hooks/useCacheCallWithValue'; | ||
import { useAccount } from '../../../hooks/useAccount'; | ||
// import { RedeemDialog } from './RedeemDialiog'; | ||
|
||
export enum DialogType { | ||
NONE, | ||
CLAIM, | ||
REDEEM, | ||
} | ||
|
||
interface Props { | ||
amount: string; | ||
} | ||
|
||
export function CSovActions(props: Props) { | ||
const { t } = useTranslation(); | ||
const [dialog, setDialog] = useState(DialogType.NONE); | ||
|
||
const { value: processed, loading } = useCacheCallWithValue<boolean>( | ||
'vestingRegistry', | ||
'processedList', | ||
false, | ||
useAccount(), | ||
); | ||
|
||
return ( | ||
<> | ||
<Button | ||
minimal | ||
text={t(translations.userAssets.actions.claimSov)} | ||
className="text-gold button-round" | ||
onClick={() => setDialog(DialogType.CLAIM)} | ||
disabled={processed} | ||
loading={loading} | ||
/> | ||
{/*<Button*/} | ||
{/* minimal*/} | ||
{/* text={t(translations.userAssets.actions.redeemRBTC)}*/} | ||
{/* className="text-gold button-round"*/} | ||
{/* onClick={() => setDialog(DialogType.REDEEM)}*/} | ||
{/*/>*/} | ||
<ClaimDialog | ||
isOpen={dialog === DialogType.CLAIM} | ||
onClose={() => setDialog(DialogType.NONE)} | ||
amount={props.amount} | ||
/> | ||
{/*<RedeemDialog*/} | ||
{/* isOpen={dialog === DialogType.REDEEM}*/} | ||
{/* onClose={() => setDialog(DialogType.NONE)}*/} | ||
{/* amount={props.amount}*/} | ||
{/*/>*/} | ||
</> | ||
); | ||
} |
Oops, something went wrong.