diff --git a/package.json b/package.json index bed96675..4cf0239b 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,8 @@ "test": "jest" }, "dependencies": { + "@emotion/core": "^10.0.28", + "@emotion/styled": "^10.0.27", "@fortawesome/fontawesome-free": "^5.12.0", "@hot-loader/react-dom": "^16.11.0", "@tweenjs/tween.js": "^18.4.2", diff --git a/resources/assets/src/components/Captcha.module.scss b/resources/assets/src/components/Captcha.module.scss deleted file mode 100644 index d37c221f..00000000 --- a/resources/assets/src/components/Captcha.module.scss +++ /dev/null @@ -1,3 +0,0 @@ -.captcha { - cursor: pointer; -} diff --git a/resources/assets/src/components/Captcha.tsx b/resources/assets/src/components/Captcha.tsx index 29099fd4..9dbb7259 100644 --- a/resources/assets/src/components/Captcha.tsx +++ b/resources/assets/src/components/Captcha.tsx @@ -1,8 +1,10 @@ -import React from 'react' +/** @jsx jsx */ +import * as React from 'react' +import { jsx } from '@emotion/core' import Reaptcha from 'reaptcha' import { emit, on } from '@/scripts/event' import { t } from '@/scripts/i18n' -import styles from './Captcha.module.scss' +import * as cssUtils from '@/styles/utils' const eventId = Symbol() @@ -31,7 +33,7 @@ class Captcha extends React.Component<{}, State> { execute = async () => { const recaptcha = this.ref.current if (recaptcha && this.state.invisible) { - return new Promise(resolve => { + return new Promise((resolve) => { const off = on(eventId, (value: string) => { resolve(value) off() @@ -89,7 +91,7 @@ class Captcha extends React.Component<{}, State> { {t('auth.captcha')}): void } -const FileInput: React.FC = props => { +const FileInput: React.FC = (props) => { const ref = useRef(null) const handleClick = () => { @@ -29,7 +36,7 @@ const FileInput: React.FC = props => { ref={ref} onChange={props.onChange} /> -