mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-12-26 15:00:23 +05:30
af59cc033f
Convert more components from class components to functional. Fix invalid finish state when client was auto approved
34 lines
981 B
TypeScript
34 lines
981 B
TypeScript
import React from 'react';
|
|
import { FormattedMessage as Message } from 'react-intl';
|
|
|
|
import { Input } from 'app/components/ui/form';
|
|
import BaseAuthBody from 'app/components/auth/BaseAuthBody';
|
|
|
|
export default class DeviceCodeBody extends BaseAuthBody {
|
|
static displayName = 'DeviceCodeBody';
|
|
static panelId = 'deviceCode';
|
|
|
|
autoFocusField = 'user_code';
|
|
|
|
render() {
|
|
return (
|
|
<>
|
|
{this.renderErrors()}
|
|
|
|
<Message id="deviceCode" defaultMessage="Device Code">
|
|
{(nodes) => (
|
|
<Input
|
|
{...this.bindField('user_code')}
|
|
icon="key"
|
|
name="user_cide"
|
|
autoFocus
|
|
required
|
|
placeholder={nodes as string}
|
|
/>
|
|
)}
|
|
</Message>
|
|
</>
|
|
);
|
|
}
|
|
}
|