accounts-frontend/packages/app/components/auth/deviceCode/DeviceCode.tsx
ErickSkrauch af59cc033f
Extract device code into a separate view.
Convert more components from class components to functional.
Fix invalid finish state when client was auto approved
2024-12-14 13:16:29 +01:00

33 lines
996 B
TypeScript

import React, { FC } from 'react';
import { RouteComponentProps } from 'react-router-dom';
import { FormattedMessage as Message, defineMessages } from 'react-intl';
import { Button } from 'app/components/ui/form';
import AuthTitle from 'app/components/auth/AuthTitle';
import PanelTransition from 'app/components/auth/PanelTransition';
import style from './deviceCode.scss';
import DeviceCodeBody from './DeviceCodeBody';
const messages = defineMessages({
deviceCodeTitle: 'Device Code',
});
const DeviceCode: FC<RouteComponentProps> = (props) => {
return (
<PanelTransition
key="deviceCode"
className={style.form}
Title={<AuthTitle title={messages.deviceCodeTitle} />}
Body={<DeviceCodeBody {...props} />}
Footer={
<Button type="submit">
<Message id="continue" defaultMessage="Cotinute" />
</Button>
}
/>
);
};
export default DeviceCode;