-
-
Notifications
You must be signed in to change notification settings - Fork 407
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
122 additions
and
51 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
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 |
---|---|---|
@@ -1,38 +1,42 @@ | ||
import React from 'react' | ||
import { WithTranslation, withTranslation } from 'react-i18next'; | ||
|
||
import InputButton from './InputButton' | ||
import Modal from './Modal' | ||
|
||
// @ts-ignore | ||
import logoImage from 'maputnik-design/logos/logo-color.svg' | ||
|
||
type ModalSurveyProps = { | ||
type ModalSurveyInternalProps = { | ||
isOpen: boolean | ||
onOpenToggle(...args: unknown[]): unknown | ||
}; | ||
} & WithTranslation; | ||
|
||
export default class ModalSurvey extends React.Component<ModalSurveyProps> { | ||
class ModalSurveyInternal extends React.Component<ModalSurveyInternalProps> { | ||
onClick = () => { | ||
window.open('https://gregorywolanski.typeform.com/to/cPgaSY', '_blank'); | ||
|
||
this.props.onOpenToggle(); | ||
} | ||
|
||
render() { | ||
const t = this.props.t; | ||
return <Modal | ||
data-wd-key="modal:survey" | ||
isOpen={this.props.isOpen} | ||
onOpenToggle={this.props.onOpenToggle} | ||
title="Maputnik Survey" | ||
title={t("Maputnik Survey")} | ||
> | ||
<div className="maputnik-modal-survey"> | ||
<img src={logoImage} className="maputnik-modal-survey__logo" /> | ||
<h1>You + Maputnik = Maputnik better for you</h1> | ||
<p className="maputnik-modal-survey__description">We don’t track you, so we don’t know how you use Maputnik. Help us make Maputnik better for you by completing a 7–minute survey carried out by our contributing designer.</p> | ||
<InputButton onClick={this.onClick} className="maputnik-big-button maputnik-white-button maputnik-wide-button">Take the Maputnik Survey</InputButton> | ||
<p className="maputnik-modal-survey__footnote">It takes 7 minutes, tops! Every question is optional.</p> | ||
<h1>{t("You + Maputnik = Maputnik better for you")}</h1> | ||
<p className="maputnik-modal-survey__description">{t("We don’t track you, so we don’t know how you use Maputnik. Help us make Maputnik better for you by completing a 7–minute survey carried out by our contributing designer.")}</p> | ||
<InputButton onClick={this.onClick} className="maputnik-big-button maputnik-white-button maputnik-wide-button">{t("Take the Maputnik Survey")}</InputButton> | ||
<p className="maputnik-modal-survey__footnote">{t("It takes 7 minutes, tops! Every question is optional.")}</p> | ||
</div> | ||
</Modal> | ||
} | ||
} | ||
|
||
const ModalSurvey = withTranslation()(ModalSurveyInternal); | ||
export default ModalSurvey; |
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 |
---|---|---|
@@ -1,18 +1,22 @@ | ||
import React from 'react' | ||
import { WithTranslation, withTranslation } from 'react-i18next'; | ||
import './SmallError.scss'; | ||
|
||
|
||
type SmallErrorProps = { | ||
type SmallErrorInternalProps = { | ||
children?: React.ReactNode | ||
}; | ||
} & WithTranslation; | ||
|
||
|
||
export default class SmallError extends React.Component<SmallErrorProps> { | ||
class SmallErrorInternal extends React.Component<SmallErrorInternalProps> { | ||
render () { | ||
const t = this.props.t; | ||
return ( | ||
<div className="SmallError"> | ||
Error: {this.props.children} | ||
{t("Error:")} {this.props.children} | ||
</div> | ||
); | ||
} | ||
} | ||
} | ||
|
||
const SmallError = withTranslation()(SmallErrorInternal); | ||
export default SmallError; |
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
Oops, something went wrong.