From 89e398fa39fd14c9fd4a467fdd039920fb28a420 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Wed, 9 Jan 2019 12:12:05 -0800 Subject: Update prettier to version ^1.15.3 --- packages/website/ts/components/aboutPageLayout.tsx | 23 +++++----- .../website/ts/components/animatedChatIcon.tsx | 5 +-- packages/website/ts/components/banner.tsx | 5 +-- packages/website/ts/components/button.tsx | 5 +-- packages/website/ts/components/definition.tsx | 10 +---- .../components/dialogs/blockchain_err_dialog.tsx | 8 ++-- .../dialogs/eth_weth_conversion_dialog.tsx | 27 ++++++------ packages/website/ts/components/fill_order.tsx | 17 ++++---- .../website/ts/components/fill_warning_dialog.tsx | 3 +- packages/website/ts/components/hamburger.tsx | 10 ++--- packages/website/ts/components/header.tsx | 49 ++++++++++----------- packages/website/ts/components/hero.tsx | 15 ++----- packages/website/ts/components/icon.tsx | 10 +---- packages/website/ts/components/image.tsx | 5 +-- packages/website/ts/components/link.tsx | 5 +-- packages/website/ts/components/logo.tsx | 5 +-- packages/website/ts/components/mobileNav.tsx | 15 ++----- packages/website/ts/components/modals/input.tsx | 5 +-- .../website/ts/components/modals/modal_contact.tsx | 16 +++---- .../website/ts/components/nested_sidebar_menu.tsx | 4 +- packages/website/ts/components/newLayout.tsx | 30 +++---------- packages/website/ts/components/newsletter_form.tsx | 26 +++-------- packages/website/ts/components/portal/portal.tsx | 3 +- .../ts/components/sections/landing/clients.tsx | 7 +-- packages/website/ts/components/siteWrap.tsx | 5 +-- packages/website/ts/components/text.tsx | 10 +---- packages/website/ts/components/token_balances.tsx | 11 +++-- packages/website/ts/components/ui/party.tsx | 50 ++++++++++++---------- packages/website/ts/constants/globalStyle.tsx | 4 +- .../ts/containers/asset_buyer_documentation.ts | 7 +-- .../website/ts/containers/connect_documentation.ts | 7 +-- .../containers/contract_wrappers_documentation.ts | 7 +-- packages/website/ts/containers/docs_home.ts | 7 +-- .../ts/containers/ethereum_types_documentation.ts | 7 +-- packages/website/ts/containers/faq.ts | 5 ++- .../ts/containers/json_schemas_documentation.ts | 7 +-- .../ts/containers/migrations_documentation.ts | 7 +-- packages/website/ts/containers/not_found.ts | 7 +-- .../ts/containers/order_utils_documentation.ts | 7 +-- .../ts/containers/order_watcher_documentation.ts | 7 +-- packages/website/ts/containers/portal.ts | 7 +-- .../ts/containers/smart_contracts_documentation.ts | 7 +-- .../ts/containers/sol_compiler_documentation.ts | 7 +-- .../ts/containers/subproviders_documentation.ts | 7 +-- .../ts/containers/web3_wrapper_documentation.ts | 7 +-- packages/website/ts/containers/wiki.ts | 5 ++- .../ts/containers/zero_ex_js_documentation.ts | 7 +-- packages/website/ts/pages/about/jobs.tsx | 4 +- .../ts/pages/documentation/developers_page.tsx | 10 +---- packages/website/ts/pages/faq/faq.tsx | 20 +++++---- packages/website/ts/pages/instant.tsx | 50 ++++++++++------------ .../website/ts/pages/instant/config_generator.tsx | 7 +-- packages/website/ts/pages/why.tsx | 11 +---- 53 files changed, 256 insertions(+), 356 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/components/aboutPageLayout.tsx b/packages/website/ts/components/aboutPageLayout.tsx index a2fd9dd72..51c1a661e 100644 --- a/packages/website/ts/components/aboutPageLayout.tsx +++ b/packages/website/ts/components/aboutPageLayout.tsx @@ -38,18 +38,17 @@ export const AboutPageLayout = (props: Props) => ( {props.description} - {props.linkLabel && - (props.href || props.to) && ( - - {props.linkLabel} - - )} + {props.linkLabel && (props.href || props.to) && ( + + {props.linkLabel} + + )} diff --git a/packages/website/ts/components/animatedChatIcon.tsx b/packages/website/ts/components/animatedChatIcon.tsx index 9a86e244c..770536259 100644 --- a/packages/website/ts/components/animatedChatIcon.tsx +++ b/packages/website/ts/components/animatedChatIcon.tsx @@ -98,9 +98,6 @@ const Rays = styled.g` transform-origin: 50% 50%; `; -const Dot = - styled.circle < - { delay: number } > - ` +const Dot = styled.circle<{ delay: number }>` animation: ${fadeInOut} 4s ${props => `${props.delay}s`} infinite; `; diff --git a/packages/website/ts/components/banner.tsx b/packages/website/ts/components/banner.tsx index 76fc1d09e..ce3fd499a 100644 --- a/packages/website/ts/components/banner.tsx +++ b/packages/website/ts/components/banner.tsx @@ -123,10 +123,7 @@ const ButtonWrap = styled.div` // Note let's refactor this // is it absolutely necessary to have a stateless component // to pass props down into the styled icon? -const Border = - styled.div < - BorderProps > - ` +const Border = styled.div` position: absolute; background-image: ${props => props.isBottom ? 'url(/images/banner/bottomofcta.png);' : 'url(/images/banner/topofcta.png);'}; diff --git a/packages/website/ts/components/button.tsx b/packages/website/ts/components/button.tsx index 569038ae0..31a74e599 100644 --- a/packages/website/ts/components/button.tsx +++ b/packages/website/ts/components/button.tsx @@ -58,10 +58,7 @@ Button.defaultProps = { borderColor: 'rgba(255, 255, 255, .4)', }; -const ButtonBase = - styled.button < - ButtonInterface > - ` +const ButtonBase = styled.button` appearance: none; border: 1px solid transparent; display: inline-block; diff --git a/packages/website/ts/components/definition.tsx b/packages/website/ts/components/definition.tsx index 92fe54f38..bd7a40425 100644 --- a/packages/website/ts/components/definition.tsx +++ b/packages/website/ts/components/definition.tsx @@ -69,10 +69,7 @@ export const Definition = (props: Props) => ( ); -const Wrap = - styled.div < - Props > - ` +const Wrap = styled.div` max-width: ${props => props.isInline && '354px'}; & + & { @@ -97,10 +94,7 @@ const Wrap = } `; -const TextWrap = - styled.div < - Props > - ` +const TextWrap = styled.div` width: 100%; max-width: 560px; diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx index a0114d898..1c47903db 100644 --- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx +++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx @@ -148,15 +148,17 @@ export class BlockchainErrDialog extends React.Component Metamask - , you can switch networks in the top left corner of the extension popover. + + , you can switch networks in the top left corner of the extension popover.

Parity Signer

If using the{' '} Parity Signer Chrome extension - , make sure to start your local Parity node with `parity ui` or `parity --chain Kovan ui` in - order to connect to mainnet \ or Kovan respectively. + + , make sure to start your local Parity node with `parity ui` or `parity --chain Kovan ui` in order + to connect to mainnet \ or Kovan respectively.
); diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx index 9b9421f1a..5ca272b1a 100644 --- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx +++ b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx @@ -111,20 +111,19 @@ export class EthWethConversionDialog extends React.Component< )}
1 ETH = 1 WETH
- {this.props.direction === Side.Receive && - this.state.isEthTokenBalanceLoaded && ( -
- Max -
- )} + {this.props.direction === Side.Receive && this.state.isEthTokenBalanceLoaded && ( +
+ Max +
+ )}
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx index 3d0203573..2fa2b94a0 100644 --- a/packages/website/ts/components/fill_order.tsx +++ b/packages/website/ts/components/fill_order.tsx @@ -173,15 +173,14 @@ export class FillOrder extends React.Component { private _renderOrderJsonNotices(): React.ReactNode { return (
- {!_.isUndefined(this.props.initialOrder) && - !this.state.didOrderValidationRun && ( -
- - - - Validating order... -
- )} + {!_.isUndefined(this.props.initialOrder) && !this.state.didOrderValidationRun && ( +
+ + + + Validating order... +
+ )} {!_.isEmpty(this.state.orderJSONErrMsg) && ( )} diff --git a/packages/website/ts/components/fill_warning_dialog.tsx b/packages/website/ts/components/fill_warning_dialog.tsx index feb72c2ee..5be09e6c2 100644 --- a/packages/website/ts/components/fill_warning_dialog.tsx +++ b/packages/website/ts/components/fill_warning_dialog.tsx @@ -37,7 +37,8 @@ export const FillWarningDialog = (props: FillWarningDialogProps) => { be counterfeit. It is your responsibility to verify the token addresses on Etherscan ( See this how-to guide - ) before filling an order. This action may result in the loss of funds. + + ) before filling an order. This action may result in the loss of funds.
diff --git a/packages/website/ts/components/hamburger.tsx b/packages/website/ts/components/hamburger.tsx index 435d206cd..34d4ccc46 100644 --- a/packages/website/ts/components/hamburger.tsx +++ b/packages/website/ts/components/hamburger.tsx @@ -16,10 +16,7 @@ export const Hamburger: React.FunctionComponent = (props: Props) => { ); }; -const StyledHamburger = - styled.button < - Props > - ` +const StyledHamburger = styled.button` background: none; border: 0; width: 22px; @@ -41,9 +38,8 @@ const StyledHamburger = height: 2px; margin-bottom: 5px; transform-origin: 4px 0px; - transition: transform 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - background-color 0.5s cubic-bezier(0.77,0.2,0.05,1.0), - opacity 0.55s ease; + transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), + background-color 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease; &:first-child { //transform-origin: 0% 0%; diff --git a/packages/website/ts/components/header.tsx b/packages/website/ts/components/header.tsx index 90e097070..088f41048 100644 --- a/packages/website/ts/components/header.tsx +++ b/packages/website/ts/components/header.tsx @@ -87,7 +87,9 @@ class HeaderBase extends React.Component { - {_.map(navItems, (link, index) => )} + {_.map(navItems, (link, index) => ( + + ))} @@ -130,10 +132,7 @@ const NavItem = (props: { link: NavItemProps; key: string }) => { ); }; -const StyledHeader = - styled.header < - HeaderProps > - ` +const StyledHeader = styled.header` padding: 30px; background-color: ${props => props.theme.bgColor}; `; @@ -200,10 +199,7 @@ const NavLinks = styled.ul` } `; -const DropdownWrap = - styled.div < - DropdownWrapInterface > - ` +const DropdownWrap = styled.div` width: ${props => props.width || 280}px; padding: 15px 0; border: 1px solid transparent; @@ -219,27 +215,28 @@ const DropdownWrap = transition: opacity 0.35s, transform 0.35s, visibility 0s 0.35s; z-index: 20; - &:after, &:before { - bottom: 100%; - left: 50%; - border: solid transparent; - content: " "; - height: 0; - width: 0; - position: absolute; - pointer-events: none; + &:after, + &:before { + bottom: 100%; + left: 50%; + border: solid transparent; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; } &:after { - border-color: rgba(255, 255, 255, 0); - border-bottom-color: ${props => props.theme.dropdownBg}; - border-width: 10px; - margin-left: -10px; + border-color: rgba(255, 255, 255, 0); + border-bottom-color: ${props => props.theme.dropdownBg}; + border-width: 10px; + margin-left: -10px; } &:before { - border-color: rgba(255, 0, 0, 0); - border-bottom-color: ${props => props.theme.dropdownBorderColor}; - border-width: 11px; - margin-left: -11px; + border-color: rgba(255, 0, 0, 0); + border-bottom-color: ${props => props.theme.dropdownBorderColor}; + border-width: 11px; + margin-left: -11px; } @media (max-width: 768px) { diff --git a/packages/website/ts/components/hero.tsx b/packages/website/ts/components/hero.tsx index a662ee3a5..c326e0292 100644 --- a/packages/website/ts/components/hero.tsx +++ b/packages/website/ts/components/hero.tsx @@ -28,10 +28,7 @@ interface WrapProps { isFullWidth?: boolean; isCenteredMobile?: boolean; } -const Wrap = - styled.div < - WrapProps > - ` +const Wrap = styled.div` width: calc(100% - 60px); margin: 0 auto; @@ -53,10 +50,7 @@ interface TitleProps { isLarge?: any; maxWidth?: string; } -const Title = - styled.h1 < - TitleProps > - ` +const Title = styled.h1` font-size: ${props => (props.isLarge ? '80px' : '50px')}; font-weight: 300; line-height: 1.1; @@ -87,10 +81,7 @@ const Description = styled.p` } `; -const Content = - styled.div < - { width: string } > - ` +const Content = styled.div<{ width: string }>` width: 100%; @media (min-width: 768px) { diff --git a/packages/website/ts/components/icon.tsx b/packages/website/ts/components/icon.tsx index 165e999b9..60e4d04ee 100644 --- a/packages/website/ts/components/icon.tsx +++ b/packages/website/ts/components/icon.tsx @@ -32,10 +32,7 @@ export const Icon: React.FunctionComponent = (props: IconProps) => { return null; }; -export const InlineIconWrap = - styled.div < - PaddingInterface > - ` +export const InlineIconWrap = styled.div` margin: ${props => getCSSPadding(props.margin)}; display: flex; align-items: center; @@ -54,10 +51,7 @@ const _getSize = (size: string | number = 'small'): string => { return `${size}px`; }; -const StyledIcon = - styled.figure < - IconProps > - ` +const StyledIcon = styled.figure` width: ${props => _getSize(props.size)}; height: ${props => _getSize(props.size)}; margin: ${props => getCSSPadding(props.margin)}; diff --git a/packages/website/ts/components/image.tsx b/packages/website/ts/components/image.tsx index 65b2a9705..0137cfc97 100644 --- a/packages/website/ts/components/image.tsx +++ b/packages/website/ts/components/image.tsx @@ -12,9 +12,6 @@ const ImageClass: React.FunctionComponent = (props: Props) => { return ; }; -export const Image = - styled(ImageClass) < - Props > - ` +export const Image = styled(ImageClass)` margin: ${props => props.isCentered && `0 auto`}; `; diff --git a/packages/website/ts/components/link.tsx b/packages/website/ts/components/link.tsx index 080a0abcc..a66985acc 100644 --- a/packages/website/ts/components/link.tsx +++ b/packages/website/ts/components/link.tsx @@ -44,10 +44,7 @@ export const LinkWrap = styled.div` } `; -const StyledLink = - styled(SmartLink) < - LinkInterface > - ` +const StyledLink = styled(SmartLink)` display: ${props => !props.isBlock && 'inline-flex'}; color: ${props => props.color || props.theme.linkColor}; text-align: center; diff --git a/packages/website/ts/components/logo.tsx b/packages/website/ts/components/logo.tsx index 19aeb901e..f89be0711 100644 --- a/packages/website/ts/components/logo.tsx +++ b/packages/website/ts/components/logo.tsx @@ -23,10 +23,7 @@ const StyledLogo = styled.div` } `; -const Icon = - styled(LogoIcon) < - LogoInterface > - ` +const Icon = styled(LogoIcon)` flex-shrink: 0; path { diff --git a/packages/website/ts/components/mobileNav.tsx b/packages/website/ts/components/mobileNav.tsx index 573d21596..d43bbe50e 100644 --- a/packages/website/ts/components/mobileNav.tsx +++ b/packages/website/ts/components/mobileNav.tsx @@ -55,10 +55,7 @@ export class MobileNav extends React.PureComponent { } } -const Wrap = - styled.nav < - { isToggled: boolean } > - ` +const Wrap = styled.nav<{ isToggled: boolean }>` width: 100%; height: 357px; background-color: ${props => props.theme.mobileNavBgUpper}; @@ -99,19 +96,13 @@ const Overlay = styled.div` interface SectionProps { isDark?: boolean; } -const Section = - styled.div < - SectionProps > - ` +const Section = styled.div` width: 100%; padding: 15px 30px; background-color: ${props => (props.isDark ? props.theme.mobileNavBgLower : 'transparent')}; `; -const Grid = - styled(WrapGrid) < - WrapProps > - ` +const Grid = styled(WrapGrid)` justify-content: flex-start; li { diff --git a/packages/website/ts/components/modals/input.tsx b/packages/website/ts/components/modals/input.tsx index 8cfcc9763..c72e53aa0 100644 --- a/packages/website/ts/components/modals/input.tsx +++ b/packages/website/ts/components/modals/input.tsx @@ -60,10 +60,7 @@ const StyledInput = styled.input` } `; -const InputWrapper = - styled.div < - InputProps > - ` +const InputWrapper = styled.div` position: relative; flex-grow: ${props => props.width === InputWidth.Full && 1}; width: ${props => props.width === InputWidth.Half && `calc(50% - 15px)`}; diff --git a/packages/website/ts/components/modals/modal_contact.tsx b/packages/website/ts/components/modals/modal_contact.tsx index 7414df7d9..62c1062a3 100644 --- a/packages/website/ts/components/modals/modal_contact.tsx +++ b/packages/website/ts/components/modals/modal_contact.tsx @@ -361,28 +361,22 @@ const StyledDialogContent = styled(DialogContent)` } `; -const Form = - styled.form < - FormProps > - ` +const Form = styled.form` position: relative; - transition: opacity 0.30s ease-in-out, visibility 0.30s ease-in-out; + transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; opacity: ${props => props.isSuccessful && `0`}; visibility: ${props => props.isSuccessful && `hidden`}; `; -const Confirmation = - styled.div < - FormProps > - ` +const Confirmation = styled.div` position: absolute; top: 50%; text-align: center; width: 100%; left: 0; - transition: opacity 0.30s ease-in-out, visibility 0.30s ease-in-out; - transition-delay: 0.40s; + transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out; + transition-delay: 0.4s; padding: 60px 60px; transform: translateY(-50%); opacity: ${props => (props.isSuccessful ? `1` : `0`)}; diff --git a/packages/website/ts/components/nested_sidebar_menu.tsx b/packages/website/ts/components/nested_sidebar_menu.tsx index 4d4bc4617..56df880f3 100644 --- a/packages/website/ts/components/nested_sidebar_menu.tsx +++ b/packages/website/ts/components/nested_sidebar_menu.tsx @@ -77,8 +77,8 @@ export class MenuItem extends React.Component { isActive ? colors.lightLinkBlue : this.props.screenWidth === ScreenWidths.Sm - ? 'white' - : colors.grey100 + ? 'white' + : colors.grey100 } fontSize="14px" textAlign="left" diff --git a/packages/website/ts/components/newLayout.tsx b/packages/website/ts/components/newLayout.tsx index 28e7653c5..07691a02a 100644 --- a/packages/website/ts/components/newLayout.tsx +++ b/packages/website/ts/components/newLayout.tsx @@ -54,10 +54,7 @@ export const Section: React.FunctionComponent = (props: SectionPro ); }; -export const Column = - styled.div < - ColumnProps > - ` +export const Column = styled.div` width: ${props => props.width}; max-width: ${props => props.maxWidth}; padding: ${props => props.padding}; @@ -71,10 +68,7 @@ export const Column = } `; -export const FlexWrap = - styled.div < - FlexProps > - ` +export const FlexWrap = styled.div` max-width: 1500px; margin: 0 auto; padding: ${props => props.padding}; @@ -85,18 +79,12 @@ export const FlexWrap = } `; -export const WrapSticky = - styled.div < - WrapProps > - ` +export const WrapSticky = styled.div` position: sticky; top: ${props => props.offsetTop || '60px'}; `; -const SectionBase = - styled.section < - SectionProps > - ` +const SectionBase = styled.section` width: ${props => !props.isFullWidth && 'calc(100% - 60px)'}; max-width: 1500px; margin: 0 auto; @@ -110,10 +98,7 @@ const SectionBase = } `; -const Wrap = - styled(FlexWrap) < - WrapProps > - ` +const Wrap = styled(FlexWrap)` width: ${props => props.wrapWidth || 'calc(100% - 60px)'}; width: ${props => props.bgColor && 'calc(100% - 60px)'}; max-width: ${props => !props.isFullWidth && (props.maxWidth || '895px')}; @@ -121,10 +106,7 @@ const Wrap = margin: 0 auto; `; -export const WrapGrid = - styled(Wrap) < - WrapProps > - ` +export const WrapGrid = styled(Wrap)` display: flex; flex-wrap: ${props => props.isWrapped && `wrap`}; justify-content: ${props => (props.isCentered ? `center` : 'space-between')}; diff --git a/packages/website/ts/components/newsletter_form.tsx b/packages/website/ts/components/newsletter_form.tsx index bd61e3f4d..e5fd95646 100644 --- a/packages/website/ts/components/newsletter_form.tsx +++ b/packages/website/ts/components/newsletter_form.tsx @@ -117,10 +117,7 @@ const StyledForm = styled.form` margin-top: 27px; `; -const StyledInput = - styled.input < - InputProps > - ` +const StyledInput = styled.input` appearance: none; background-color: transparent; border: 0; @@ -132,7 +129,7 @@ const StyledInput = width: 100%; &::placeholder { - color: #B1B1B1; // #9D9D9D on light theme + color: #b1b1b1; // #9D9D9D on light theme } `; @@ -140,14 +137,11 @@ const InputWrapper = styled.div` position: relative; `; -const InnerInputWrapper = - styled.div < - ArrowProps > - ` +const InnerInputWrapper = styled.div` opacity: ${props => props.isSubmitted && 0}; visibility: ${props => props.isSubmitted && 'hidden'}; transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out; - transition-delay: 0.30s; + transition-delay: 0.3s; `; const SubmitButton = styled.button` @@ -174,11 +168,8 @@ const Text = styled.p` margin-top: 15px; `; -const SuccessText = - styled.p < - ArrowProps > - ` - color: #B1B1B1; +const SuccessText = styled.p` + color: #b1b1b1; font-size: 1rem; font-weight: 300; line-height: 1.2em; @@ -194,10 +185,7 @@ const SuccessText = transition-delay: 0.55s; `; -const Arrow = - styled.svg < - ArrowProps > - ` +const Arrow = styled.svg` transform: ${props => props.isSubmitted && `translateX(44px)`}; transition: transform 0.25s ease-in-out; `; diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx index 94ab63ac6..6d7c90573 100644 --- a/packages/website/ts/components/portal/portal.tsx +++ b/packages/website/ts/components/portal/portal.tsx @@ -447,7 +447,8 @@ export class Portal extends React.Component { render={this._renderAccountManagementItem.bind(this, item)} /> ); - })}} + })} + } ( ); -const StyledProject = - styled.div < - StyledProjectInterface > - ` +const StyledProject = styled.div` flex-shrink: 0; img { @@ -99,7 +96,7 @@ const StyledProject = } @media (min-width: 768px) { - width: auto; + width: auto; height: 50px; margin: 30px; } diff --git a/packages/website/ts/components/siteWrap.tsx b/packages/website/ts/components/siteWrap.tsx index 316896dbb..1f0902105 100644 --- a/packages/website/ts/components/siteWrap.tsx +++ b/packages/website/ts/components/siteWrap.tsx @@ -140,10 +140,7 @@ export class SiteWrap extends React.Component { } } -const Main = - styled.main < - MainProps > - ` +const Main = styled.main` transition: transform 0.5s, opacity 0.5s; opacity: ${props => props.isNavToggled && '0.5'}; `; diff --git a/packages/website/ts/components/text.tsx b/packages/website/ts/components/text.tsx index 10f272e73..a47e61ef3 100644 --- a/packages/website/ts/components/text.tsx +++ b/packages/website/ts/components/text.tsx @@ -27,10 +27,7 @@ interface ParagraphProps extends BaseTextInterface { fontWeight?: string | number; } -const StyledHeading = - styled.h1 < - HeadingProps > - ` +const StyledHeading = styled.h1` max-width: ${props => props.maxWidth}; color: ${props => props.color || props.theme.textColor}; display: ${props => props.isFlex && `inline-flex`}; @@ -64,10 +61,7 @@ Heading.defaultProps = { // Note: this would be useful to be implemented the same way was "Heading" // and be more generic. e.g. with a props asElement so we can use it // for literally anything = -export const Paragraph = - styled.p < - ParagraphProps > - ` +export const Paragraph = styled.p` font-size: ${props => `var(--${props.size || 'default'}Paragraph)`}; font-weight: ${props => props.fontWeight || 300}; margin-bottom: ${props => !props.isNoMargin && (props.marginBottom || '30px')}; diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 92aecf046..2ed0229c8 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -354,12 +354,11 @@ export class TokenBalances extends React.Component {this._renderAmount(tokenState.balance, token.decimals)} {token.symbol} - {this.state.isZRXSpinnerVisible && - token.symbol === ZRX_TOKEN_SYMBOL && ( - - - - )} + {this.state.isZRXSpinnerVisible && token.symbol === ZRX_TOKEN_SYMBOL && ( + + + + )} ) : ( diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx index f9e0967d4..a14b94d8a 100644 --- a/packages/website/ts/components/ui/party.tsx +++ b/packages/website/ts/components/ui/party.tsx @@ -94,14 +94,17 @@ export class Party extends React.Component { {isRegistered ? (
- This token address was found in the token registry
+ This token address was found in the token registry +
smart contract and is therefore believed to be a
legitimate token.
) : (
- This token is not included in the token registry
- smart contract. We cannot guarantee the legitimacy
+ This token is not included in the token registry +
+ smart contract. We cannot guarantee the legitimacy +
of this token. Make sure to verify its address on Etherscan.
)} @@ -109,27 +112,28 @@ export class Party extends React.Component { )} - {!_.isUndefined(this.props.hasUniqueNameAndSymbol) && - !this.props.hasUniqueNameAndSymbol && ( -
-
- - - {' '} - Suspicious token - - This token shares it's name, symbol or both with
- a token in the 0x Token Registry but it has a different
- smart contract address. This is most likely a scam token! -
-
+ {!_.isUndefined(this.props.hasUniqueNameAndSymbol) && !this.props.hasUniqueNameAndSymbol && ( +
+
+ + + {' '} + Suspicious token + + This token shares it's name, symbol or both with +
+ a token in the 0x Token Registry but it has a different +
+ smart contract address. This is most likely a scam token! +
- )} +
+ )}
); diff --git a/packages/website/ts/constants/globalStyle.tsx b/packages/website/ts/constants/globalStyle.tsx index 5abb758c5..ef7ec9426 100644 --- a/packages/website/ts/constants/globalStyle.tsx +++ b/packages/website/ts/constants/globalStyle.tsx @@ -11,9 +11,7 @@ export interface GlobalStyle { } const GlobalStyles = withTheme( - createGlobalStyle < - GlobalStyle > - ` + createGlobalStyle` ${cssReset}; html { diff --git a/packages/website/ts/containers/asset_buyer_documentation.ts b/packages/website/ts/containers/asset_buyer_documentation.ts index 815176e47..a75c6d861 100644 --- a/packages/website/ts/containers/asset_buyer_documentation.ts +++ b/packages/website/ts/containers/asset_buyer_documentation.ts @@ -40,6 +40,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts index 19fd0ee56..1cfc0702e 100644 --- a/packages/website/ts/containers/connect_documentation.ts +++ b/packages/website/ts/containers/connect_documentation.ts @@ -45,6 +45,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts index dec95ae62..bbabce7a7 100644 --- a/packages/website/ts/containers/contract_wrappers_documentation.ts +++ b/packages/website/ts/containers/contract_wrappers_documentation.ts @@ -40,6 +40,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/docs_home.ts b/packages/website/ts/containers/docs_home.ts index e0ca439a6..2a6dac0e2 100644 --- a/packages/website/ts/containers/docs_home.ts +++ b/packages/website/ts/containers/docs_home.ts @@ -26,6 +26,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const DocsHome: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocsHomeComponent, -); +export const DocsHome: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocsHomeComponent); diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts index 9b668d515..e6e4d4067 100644 --- a/packages/website/ts/containers/ethereum_types_documentation.ts +++ b/packages/website/ts/containers/ethereum_types_documentation.ts @@ -36,6 +36,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/faq.ts b/packages/website/ts/containers/faq.ts index a2b5735f6..da5b71bdd 100644 --- a/packages/website/ts/containers/faq.ts +++ b/packages/website/ts/containers/faq.ts @@ -22,4 +22,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const FAQ: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)(FAQComponent); +export const FAQ: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(FAQComponent); diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts index 3862ba878..1090265e7 100644 --- a/packages/website/ts/containers/json_schemas_documentation.ts +++ b/packages/website/ts/containers/json_schemas_documentation.ts @@ -65,6 +65,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/migrations_documentation.ts b/packages/website/ts/containers/migrations_documentation.ts index dd5db3ac6..bae84dfea 100644 --- a/packages/website/ts/containers/migrations_documentation.ts +++ b/packages/website/ts/containers/migrations_documentation.ts @@ -61,6 +61,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/not_found.ts b/packages/website/ts/containers/not_found.ts index f384dab89..825c021ec 100644 --- a/packages/website/ts/containers/not_found.ts +++ b/packages/website/ts/containers/not_found.ts @@ -22,6 +22,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const NotFound: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - NotFoundComponent, -); +export const NotFound: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(NotFoundComponent); diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts index 4996c329a..8d83357ca 100644 --- a/packages/website/ts/containers/order_utils_documentation.ts +++ b/packages/website/ts/containers/order_utils_documentation.ts @@ -41,6 +41,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts index f3d3bada8..149ffdd2a 100644 --- a/packages/website/ts/containers/order_watcher_documentation.ts +++ b/packages/website/ts/containers/order_watcher_documentation.ts @@ -41,6 +41,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/portal.ts b/packages/website/ts/containers/portal.ts index 5661e0a97..db41a3ec3 100644 --- a/packages/website/ts/containers/portal.ts +++ b/packages/website/ts/containers/portal.ts @@ -87,6 +87,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Portal: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - PortalComponent, -); +export const Portal: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(PortalComponent); diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts index 7c0de5515..d94e285a7 100644 --- a/packages/website/ts/containers/smart_contracts_documentation.ts +++ b/packages/website/ts/containers/smart_contracts_documentation.ts @@ -91,6 +91,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts index e899e9627..31117372b 100644 --- a/packages/website/ts/containers/sol_compiler_documentation.ts +++ b/packages/website/ts/containers/sol_compiler_documentation.ts @@ -45,6 +45,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts index c7fb807a6..2ac0360ab 100644 --- a/packages/website/ts/containers/subproviders_documentation.ts +++ b/packages/website/ts/containers/subproviders_documentation.ts @@ -44,6 +44,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts index ad286da1a..73fea90ed 100644 --- a/packages/website/ts/containers/web3_wrapper_documentation.ts +++ b/packages/website/ts/containers/web3_wrapper_documentation.ts @@ -40,6 +40,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/wiki.ts b/packages/website/ts/containers/wiki.ts index 069b0ae54..f4f2f6ec6 100644 --- a/packages/website/ts/containers/wiki.ts +++ b/packages/website/ts/containers/wiki.ts @@ -25,4 +25,7 @@ const mapDispatchToProps = (dispatch: Dispatch): ConnectedDispatch => ({ dispatcher: new Dispatcher(dispatch), }); -export const Wiki: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)(WikiComponent); +export const Wiki: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(WikiComponent); diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts index 5da8d5e52..0e4765656 100644 --- a/packages/website/ts/containers/zero_ex_js_documentation.ts +++ b/packages/website/ts/containers/zero_ex_js_documentation.ts @@ -72,6 +72,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/pages/about/jobs.tsx b/packages/website/ts/pages/about/jobs.tsx index ee1aa6cef..85c25a75f 100644 --- a/packages/website/ts/pages/about/jobs.tsx +++ b/packages/website/ts/pages/about/jobs.tsx @@ -151,7 +151,9 @@ export class NextAboutJobs extends React.Component - Current
Openings + Current +
+ Openings
diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx index 78376a0f2..0b725c514 100644 --- a/packages/website/ts/pages/documentation/developers_page.tsx +++ b/packages/website/ts/pages/documentation/developers_page.tsx @@ -68,10 +68,7 @@ interface SidebarContainerProps { className?: string; } -const SidebarContainer = - styled.div < - SidebarContainerProps > - ` +const SidebarContainer = styled.div` ${scrollableContainerStyles} padding-top: 27px; padding-left: ${SIDEBAR_PADDING}px; @@ -87,10 +84,7 @@ interface MainContentContainerProps { className?: string; } -const MainContentContainer = - styled.div < - MainContentContainerProps > - ` +const MainContentContainer = styled.div` ${scrollableContainerStyles} padding-top: 0px; padding-left: 50px; diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx index 8cde7224e..548db1d1d 100644 --- a/packages/website/ts/pages/faq/faq.tsx +++ b/packages/website/ts/pages/faq/faq.tsx @@ -36,17 +36,16 @@ const sections: FAQSection[] = [
At its core, 0x is an open and non-rent seeking protocol that facilitates trustless, low friction exchange of Ethereum-based assets. Developers can use 0x as a platform to build - exchange applications on top of ( + exchange applications on top of ( + 0x.js {' '} is a Javascript library for interacting with the 0x protocol). For end users, 0x will be the infrastructure of a wide variety of user-facing applications i.e.{' '} 0x Portal - , a decentralized application that facilitates trustless trading of Ethereum-based tokens + + , a decentralized application that facilitates trustless trading of Ethereum-based tokens between known counterparties.
), @@ -253,7 +252,8 @@ const sections: FAQSection[] = [ target="_blank" > development roadmap - . + + . ), }, @@ -360,7 +360,8 @@ const sections: FAQSection[] = [ target="_blank" > here - . + + . ), }, @@ -380,8 +381,9 @@ const sections: FAQSection[] = [ Join our{' '} Discord - ! As an open source project, 0x will rely on a worldwide community of passionate developers - to contribute proposals, ideas and code. + + ! As an open source project, 0x will rely on a worldwide community of passionate developers to + contribute proposals, ideas and code. ), }, diff --git a/packages/website/ts/pages/instant.tsx b/packages/website/ts/pages/instant.tsx index b97bb35a4..586665d5b 100644 --- a/packages/website/ts/pages/instant.tsx +++ b/packages/website/ts/pages/instant.tsx @@ -100,7 +100,7 @@ export class Next0xInstant extends React.Component {
{[...Array(18)].map((item, index) => ( - + ))}
@@ -189,13 +189,10 @@ const fadeUp = keyframes` } `; -const ConfiguratorSection = - styled(Section) < - SectionProps > - ` - @media (max-width: ${CONFIGURATOR_MIN_WIDTH_PX}px) { - display: none; - } +const ConfiguratorSection = styled(Section)` + @media (max-width: ${CONFIGURATOR_MIN_WIDTH_PX}px) { + display: none; + } `; // width = 370 * 12 @@ -233,29 +230,26 @@ const MarqueeWrap = styled.div` } `; -const Card = - styled.div < - { index: number } > - ` - opacity: 0; - flex-shrink: 0; - transform: translateY(10px); - will-change: opacity, transform; - animation: ${fadeUp} 0.75s ${props => `${props.index * 0.05}s`} forwards; - - img { - height: auto; - } +const Card = styled.div<{ index: number }>` + opacity: 0; + flex-shrink: 0; + transform: translateY(10px); + will-change: opacity, transform; + animation: ${fadeUp} 0.75s ${props => `${props.index * 0.05}s`} forwards; - @media (min-width: 768px) { img { - width: 370px; + height: auto; } - } - @media (max-width: 768px) { - img { - width: 300px; + @media (min-width: 768px) { + img { + width: 370px; + } + } + + @media (max-width: 768px) { + img { + width: 300px; + } } - } `; diff --git a/packages/website/ts/pages/instant/config_generator.tsx b/packages/website/ts/pages/instant/config_generator.tsx index e43d47119..29fce85db 100644 --- a/packages/website/ts/pages/instant/config_generator.tsx +++ b/packages/website/ts/pages/instant/config_generator.tsx @@ -318,13 +318,10 @@ interface CheckboxTextProps { isSelected?: boolean; } -const CheckboxText = - styled.span < - CheckboxTextProps > - ` +const CheckboxText = styled.span` font-size: 14px; line-height: 18px; - color: ${props => (props.isSelected ? colors.brandDark : '#666666')} + color: ${props => (props.isSelected ? colors.brandDark : '#666666')}; `; const OptionalAction = styled(OptionalText)` diff --git a/packages/website/ts/pages/why.tsx b/packages/website/ts/pages/why.tsx index 197ce5fc9..a0ed5f95a 100644 --- a/packages/website/ts/pages/why.tsx +++ b/packages/website/ts/pages/why.tsx @@ -229,10 +229,7 @@ interface SectionProps { isNotRelative?: boolean; } -const SectionWrap = - styled.div < - SectionProps > - ` +const SectionWrap = styled.div` position: ${props => !props.isNotRelative && 'relative'}; & + & { @@ -258,10 +255,7 @@ const SectionWrap = interface SectionTitleProps { isNoBorder?: boolean; } -const SectionTitle = - styled(Heading) < - SectionTitleProps > - ` +const SectionTitle = styled(Heading)` position: relative; ${props => @@ -278,7 +272,6 @@ const SectionTitle = } `} - @media (max-width: 768px) { &:before { width: calc(100vw - 60px); -- cgit v1.2.3 From a091b2c19d3dae1eacd9b36f71bca9683001ea33 Mon Sep 17 00:00:00 2001 From: Alex Browne Date: Thu, 10 Jan 2019 17:44:35 -0800 Subject: Rebase and re-apply prettier --- packages/website/ts/containers/sol_coverage_documentation.ts | 7 ++++--- packages/website/ts/containers/sol_profiler_documentation.ts | 7 ++++--- packages/website/ts/containers/sol_trace_documentation.ts | 7 ++++--- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/containers/sol_coverage_documentation.ts b/packages/website/ts/containers/sol_coverage_documentation.ts index 25d67e2d0..a9073b720 100644 --- a/packages/website/ts/containers/sol_coverage_documentation.ts +++ b/packages/website/ts/containers/sol_coverage_documentation.ts @@ -38,6 +38,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_profiler_documentation.ts b/packages/website/ts/containers/sol_profiler_documentation.ts index 14839831e..2f3936cae 100644 --- a/packages/website/ts/containers/sol_profiler_documentation.ts +++ b/packages/website/ts/containers/sol_profiler_documentation.ts @@ -38,6 +38,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); diff --git a/packages/website/ts/containers/sol_trace_documentation.ts b/packages/website/ts/containers/sol_trace_documentation.ts index c5286f1ff..9c2552438 100644 --- a/packages/website/ts/containers/sol_trace_documentation.ts +++ b/packages/website/ts/containers/sol_trace_documentation.ts @@ -38,6 +38,7 @@ const docsInfoConfig: DocsInfoConfig = { }; const mapStateToProps = getMapStateToProps(docsInfoConfig); -export const Documentation: React.ComponentClass = connect(mapStateToProps, mapDispatchToProps)( - DocPageComponent, -); +export const Documentation: React.ComponentClass = connect( + mapStateToProps, + mapDispatchToProps, +)(DocPageComponent); -- cgit v1.2.3 From 943c378309a84ed142852c6584b53958df7817c8 Mon Sep 17 00:00:00 2001 From: Xianny <8582774+xianny@users.noreply.github.com> Date: Fri, 11 Jan 2019 10:04:30 -0800 Subject: Implement tslint enum-naming to enforce PascalCase on enum members (#1474) --- .../ts/components/dialogs/ledger_config_dialog.tsx | 18 +++++----- packages/website/ts/components/fill_order.tsx | 8 ++--- .../ts/components/generate_order/asset_picker.tsx | 42 +++++++++++----------- .../generate_order/generate_order_form.tsx | 20 +++++------ .../components/generate_order/new_token_form.tsx | 2 +- .../components/inputs/allowance_state_toggle.tsx | 2 +- packages/website/ts/components/portal/portal.tsx | 4 +-- packages/website/ts/components/token_balances.tsx | 22 ++++++------ packages/website/ts/components/ui/alert.tsx | 2 +- .../ts/components/ui/lifecycle_raised_button.tsx | 24 ++++++------- packages/website/ts/types.ts | 36 +++++++++---------- packages/website/ts/utils/utils.ts | 10 +++--- 12 files changed, 95 insertions(+), 95 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx index e15a2dd94..527353aa0 100644 --- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx +++ b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx @@ -20,8 +20,8 @@ import { utils } from 'ts/utils/utils'; const VALID_ETHEREUM_DERIVATION_PATH_PREFIX = `44'/60'`; enum LedgerSteps { - CONNECT, - SELECT_ADDRESS, + Connect, + SelectAddress, } interface LedgerConfigDialogProps { @@ -52,7 +52,7 @@ export class LedgerConfigDialog extends React.Component, ]; const dialogTitle = - this.state.stepIndex === LedgerSteps.CONNECT ? 'Connect to your Ledger' : 'Select desired address'; + this.state.stepIndex === LedgerSteps.Connect ? 'Connect to your Ledger' : 'Select desired address'; return (
- {this.state.stepIndex === LedgerSteps.CONNECT && this._renderConnectStep()} - {this.state.stepIndex === LedgerSteps.SELECT_ADDRESS && this._renderSelectAddressStep()} + {this.state.stepIndex === LedgerSteps.Connect && this._renderConnectStep()} + {this.state.stepIndex === LedgerSteps.SelectAddress && this._renderSelectAddressStep()}
); @@ -195,7 +195,7 @@ export class LedgerConfigDialog extends React.Component { )} {!_.isEmpty(this.state.orderJSONErrMsg) && ( - + )} ); @@ -298,7 +298,7 @@ export class FillOrder extends React.Component { onClick={this._onCancelOrderClickFireAndForgetAsync.bind(this)} /> {this.state.didCancelOrderSucceed && ( - + )} ) : ( @@ -310,10 +310,10 @@ export class FillOrder extends React.Component { onClick={this._onFillOrderClick.bind(this)} /> {!_.isEmpty(this.state.globalErrMsg) && ( - + )} {this.state.didFillOrderSucceed && ( - + )} )} diff --git a/packages/website/ts/components/generate_order/asset_picker.tsx b/packages/website/ts/components/generate_order/asset_picker.tsx index e6ecd2ec8..d3f11f962 100644 --- a/packages/website/ts/components/generate_order/asset_picker.tsx +++ b/packages/website/ts/components/generate_order/asset_picker.tsx @@ -18,9 +18,9 @@ import { utils } from 'ts/utils/utils'; const TOKEN_ICON_DIMENSION = 100; const TILE_DIMENSION = 146; enum AssetViews { - ASSET_PICKER = 'ASSET_PICKER', - NEW_TOKEN_FORM = 'NEW_TOKEN_FORM', - CONFIRM_TRACK_TOKEN = 'CONFIRM_TRACK_TOKEN', + AssetPicker = 'ASSET_PICKER', + NewTokenForm = 'NEW_TOKEN_FORM', + ConfirmTrackToken = 'CONFIRM_TRACK_TOKEN', } interface AssetPickerProps { @@ -44,29 +44,29 @@ interface AssetPickerState { export class AssetPicker extends React.Component { public static defaultProps: Partial = { - tokenVisibility: TokenVisibility.ALL, + tokenVisibility: TokenVisibility.All, }; private readonly _dialogConfigsByAssetView: { [assetView: string]: DialogConfigs }; constructor(props: AssetPickerProps) { super(props); this.state = { - assetView: AssetViews.ASSET_PICKER, + assetView: AssetViews.AssetPicker, hoveredAddress: undefined, chosenTrackTokenAddress: undefined, isAddingTokenToTracked: false, }; this._dialogConfigsByAssetView = { - [AssetViews.ASSET_PICKER]: { + [AssetViews.AssetPicker]: { title: 'Select token', isModal: false, actions: [], }, - [AssetViews.NEW_TOKEN_FORM]: { + [AssetViews.NewTokenForm]: { title: 'Add an ERC20 token', isModal: false, actions: [], }, - [AssetViews.CONFIRM_TRACK_TOKEN]: { + [AssetViews.ConfirmTrackToken]: { title: 'Tracking confirmation', isModal: true, actions: [ @@ -95,15 +95,15 @@ export class AssetPicker extends React.Component - {this.state.assetView === AssetViews.ASSET_PICKER && this._renderAssetPicker()} - {this.state.assetView === AssetViews.NEW_TOKEN_FORM && ( + {this.state.assetView === AssetViews.AssetPicker && this._renderAssetPicker()} + {this.state.assetView === AssetViews.NewTokenForm && ( )} - {this.state.assetView === AssetViews.CONFIRM_TRACK_TOKEN && this._renderConfirmTrackToken()} + {this.state.assetView === AssetViews.ConfirmTrackToken && this._renderConfirmTrackToken()} ); } @@ -138,19 +138,19 @@ export class AssetPicker extends React.Component { return ( token.symbol !== constants.ZRX_TOKEN_SYMBOL && token.symbol !== constants.ETHER_TOKEN_SYMBOL && - ((this.props.tokenVisibility === TokenVisibility.TRACKED && utils.isTokenTracked(token)) || - (this.props.tokenVisibility === TokenVisibility.UNTRACKED && + ((this.props.tokenVisibility === TokenVisibility.Tracked && utils.isTokenTracked(token)) || + (this.props.tokenVisibility === TokenVisibility.Untracked && !utils.isTokenTracked(token))) ); }); // if we are showing tracked tokens, sort by date added, otherwise sort by symbol - const sortKey = this.props.tokenVisibility === TokenVisibility.TRACKED ? 'trackedTimestamp' : 'symbol'; + const sortKey = this.props.tokenVisibility === TokenVisibility.Tracked ? 'trackedTimestamp' : 'symbol'; const sortedTokens = filteredTokens.sort(firstBy(sortKey)); if (_.isEmpty(sortedTokens)) { return
No tokens to remove.
; @@ -188,7 +188,7 @@ export class AssetPicker extends React.Component {this.state.globalErrMsg !== '' && ( - + )} @@ -215,7 +215,7 @@ export class GenerateOrderForm extends React.Component { @@ -305,13 +305,13 @@ export class GenerateOrderForm extends React.Component { this.setState({ - signingState: SigningState.SIGNING, + signingState: SigningState.Signing, }); const exchangeAddress = this.props.blockchain.getExchangeContractAddressIfExists(); if (_.isUndefined(exchangeAddress)) { this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true); this.setState({ - signingState: SigningState.UNSIGNED, + signingState: SigningState.Unsigned, }); return undefined; } @@ -371,7 +371,7 @@ export class GenerateOrderForm extends React.Component - {this.state.globalErrMsg !== '' && } + {this.state.globalErrMsg !== '' && } ); } diff --git a/packages/website/ts/components/inputs/allowance_state_toggle.tsx b/packages/website/ts/components/inputs/allowance_state_toggle.tsx index 5396295d2..3a78d32f3 100644 --- a/packages/website/ts/components/inputs/allowance_state_toggle.tsx +++ b/packages/website/ts/components/inputs/allowance_state_toggle.tsx @@ -150,7 +150,7 @@ export class AllowanceStateToggle extends React.Component { const isAssetPickerDialogOpen = this.state.tokenManagementState !== TokenManagementState.None; const tokenVisibility = this.state.tokenManagementState === TokenManagementState.Add - ? TokenVisibility.UNTRACKED - : TokenVisibility.TRACKED; + ? TokenVisibility.Untracked + : TokenVisibility.Tracked; return ( diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx index 2ed0229c8..e8f2a6461 100644 --- a/packages/website/ts/components/token_balances.tsx +++ b/packages/website/ts/components/token_balances.tsx @@ -303,7 +303,7 @@ export class TokenBalances extends React.Component ); @@ -439,7 +439,7 @@ export class TokenBalances extends React.Component Our faucet can only send test Ether to addresses on testnets. Please make sure you are connected @@ -468,7 +468,7 @@ export class TokenBalances extends React.Component ); - case BalanceErrs.faucetRequestFailed: + case BalanceErrs.FaucetRequestFailed: return (
An unexpected error occurred while trying to request test Ether from our faucet. Please refresh @@ -476,13 +476,13 @@ export class TokenBalances extends React.Component ); - case BalanceErrs.faucetQueueIsFull: + case BalanceErrs.FaucetQueueIsFull: return
Our test Ether faucet queue is full. Please try requesting test Ether again later.
; - case BalanceErrs.mintingFailed: + case BalanceErrs.MintingFailed: return
Minting your test tokens failed unexpectedly. Please refresh the page and try again.
; - case BalanceErrs.allowanceSettingFailed: + case BalanceErrs.AllowanceSettingFailed: return (
An unexpected error occurred while trying to set your test token allowance. Please refresh the @@ -521,7 +521,7 @@ export class TokenBalances extends React.Component ${responseBody}`); const errorType = response.status === constants.UNAVAILABLE_STATUS - ? BalanceErrs.faucetQueueIsFull - : BalanceErrs.faucetRequestFailed; + ? BalanceErrs.FaucetQueueIsFull + : BalanceErrs.FaucetRequestFailed; this.setState({ errorType, }); diff --git a/packages/website/ts/components/ui/alert.tsx b/packages/website/ts/components/ui/alert.tsx index 32e0f1be8..c7a5b9030 100644 --- a/packages/website/ts/components/ui/alert.tsx +++ b/packages/website/ts/components/ui/alert.tsx @@ -8,7 +8,7 @@ interface AlertProps { } export const Alert = (props: AlertProps) => { - const isAlert = props.type === AlertTypes.ERROR; + const isAlert = props.type === AlertTypes.Error; const errMsgStyles = { background: isAlert ? colors.red200 : colors.lightestGreen, color: colors.white, diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx index a8daf4102..f004dd47f 100644 --- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx +++ b/packages/website/ts/components/ui/lifecycle_raised_button.tsx @@ -6,9 +6,9 @@ import * as React from 'react'; const COMPLETE_STATE_SHOW_LENGTH_MS = 2000; enum ButtonState { - READY, - LOADING, - COMPLETE, + Ready, + Loading, + Complete, } interface LifeCycleRaisedButtonProps { @@ -38,7 +38,7 @@ export class LifeCycleRaisedButton extends React.Component ); } public async onClickAsync(): Promise { this.setState({ - buttonState: ButtonState.LOADING, + buttonState: ButtonState.Loading, }); const didSucceed = await this.props.onClickAsyncFn(); if (this._didUnmount) { @@ -86,16 +86,16 @@ export class LifeCycleRaisedButton extends React.Component { this.setState({ - buttonState: ButtonState.READY, + buttonState: ButtonState.Ready, }); }, COMPLETE_STATE_SHOW_LENGTH_MS); } else { this.setState({ - buttonState: ButtonState.READY, + buttonState: ButtonState.Ready, }); } } diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts index 50114e2d6..9492da5a5 100644 --- a/packages/website/ts/types.ts +++ b/packages/website/ts/types.ts @@ -83,12 +83,12 @@ export interface Fill { } export enum BalanceErrs { - incorrectNetworkForFaucet, - faucetRequestFailed, - faucetQueueIsFull, - mintingFailed, - sendFailed, - allowanceSettingFailed, + IncorrectNetworkForFaucet, + FaucetRequestFailed, + FaucetQueueIsFull, + MintingFailed, + SendFailed, + AllowanceSettingFailed, } export enum ActionTypes { @@ -209,8 +209,8 @@ export enum ScreenWidths { } export enum AlertTypes { - ERROR, - SUCCESS, + Error, + Success, } export enum BlockchainErrs { @@ -228,11 +228,11 @@ export enum BlockchainCallErrs { } export enum Environments { - DEVELOPMENT = 'DEVELOPMENT', - DOGFOOD = 'DOGFOOD', - STAGING = 'STAGING', - PRODUCTION = 'PRODUCTION', - UNKNOWN = 'UNKNOWN', + Development = 'DEVELOPMENT', + Dogfood = 'DOGFOOD', + Staging = 'STAGING', + Production = 'PRODUCTION', + Unknown = 'UNKNOWN', } export type ContractInstance = any; // TODO: add type definition for Contract @@ -323,9 +323,9 @@ export interface DialogConfigs { } export enum TokenVisibility { - ALL = 'ALL', - UNTRACKED = 'UNTRACKED', - TRACKED = 'TRACKED', + All = 'ALL', + Untracked = 'UNTRACKED', + Tracked = 'TRACKED', } export interface VersionToFilePath { @@ -350,7 +350,7 @@ export enum WebsitePaths { Docs = '/docs', ZeroExJs = '/docs/0x.js', Home = '/', - FAQ = '/faq', + FAQ = '/faq', // tslint:disable-line:enum-naming About = '/about', AboutMission = '/about/mission', AboutTeam = '/about/team', @@ -629,7 +629,7 @@ export enum BrowserType { export enum OperatingSystemType { Android = 'Android', - iOS = 'iOS', + iOS = 'iOS', // tslint:disable-line:enum-naming Mac = 'Mac', Windows = 'Windows', WindowsPhone = 'WindowsPhone', diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index 8cc0061de..890f1553a 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -342,18 +342,18 @@ export const utils = { }, getEnvironment(): Environments { if (utils.isDogfood()) { - return Environments.DOGFOOD; + return Environments.Dogfood; } if (utils.isDevelopment()) { - return Environments.DEVELOPMENT; + return Environments.Development; } if (utils.isStaging()) { - return Environments.STAGING; + return Environments.Staging; } if (utils.isProduction()) { - return Environments.PRODUCTION; + return Environments.Production; } - return Environments.UNKNOWN; + return Environments.Unknown; }, getEthToken(tokenByAddress: TokenByAddress): Token { return utils.getTokenBySymbol(constants.ETHER_TOKEN_SYMBOL, tokenByAddress); -- cgit v1.2.3 From bc4477411694ecd23bb40d945df3dd426090d94d Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 11 Jan 2019 11:50:35 -0800 Subject: fix: use basscss from css file instead of module --- packages/website/ts/index.tsx | 1 - 1 file changed, 1 deletion(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx index 4ed66c572..7bb018d17 100644 --- a/packages/website/ts/index.tsx +++ b/packages/website/ts/index.tsx @@ -31,7 +31,6 @@ import { NextWhy } from 'ts/pages/why'; tradeHistoryStorage.clearIfRequired(); trackedTokenStorage.clearIfRequired(); -import 'basscss/css/basscss.css'; import 'less/all.less'; // We pass modulePromise returning lambda instead of module promise, -- cgit v1.2.3 From 500d8fc86b4f3227007556d05b33e9a8dcd27c7f Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 11 Jan 2019 11:57:26 -0800 Subject: hack: force redux and redux-devtools to work for build --- packages/website/ts/redux/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/redux/store.ts b/packages/website/ts/redux/store.ts index 006241371..0ef345c80 100644 --- a/packages/website/ts/redux/store.ts +++ b/packages/website/ts/redux/store.ts @@ -8,9 +8,9 @@ import { reducer, State } from 'ts/redux/reducer'; const ONE_SECOND = 1000; export const store: ReduxStore = createStore( - reducer, + reducer as any, stateStorage.getPersistedDefaultState(), - composeWithDevTools(applyMiddleware(analyticsMiddleware)), + composeWithDevTools(applyMiddleware(analyticsMiddleware) as any) as any, ); store.subscribe( _.throttle(() => { -- cgit v1.2.3 From 7fcdfe5de55129e81738c23c55170f1f36e41614 Mon Sep 17 00:00:00 2001 From: fragosti Date: Fri, 11 Jan 2019 12:53:32 -0800 Subject: Revert "hack: force redux and redux-devtools to work for build" This reverts commit 500d8fc86b4f3227007556d05b33e9a8dcd27c7f. --- packages/website/ts/redux/store.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/website/ts') diff --git a/packages/website/ts/redux/store.ts b/packages/website/ts/redux/store.ts index 0ef345c80..006241371 100644 --- a/packages/website/ts/redux/store.ts +++ b/packages/website/ts/redux/store.ts @@ -8,9 +8,9 @@ import { reducer, State } from 'ts/redux/reducer'; const ONE_SECOND = 1000; export const store: ReduxStore = createStore( - reducer as any, + reducer, stateStorage.getPersistedDefaultState(), - composeWithDevTools(applyMiddleware(analyticsMiddleware) as any) as any, + composeWithDevTools(applyMiddleware(analyticsMiddleware)), ); store.subscribe( _.throttle(() => { -- cgit v1.2.3