one-click-accessibility/modules/scanner/assets/js/components/not-connected-message/index.js
VasylD 8573e61f5b
[APP-1513] add disconnected msg (#290)
* [APP-1513] add disconnected msg

* [APP-1513] add disconnected msg

* [APP-1513] add disconnected msg
2025-06-09 11:24:42 +02:00

36 lines
1 KiB
JavaScript

import Button from '@elementor/ui/Button';
import Typography from '@elementor/ui/Typography';
import { useAuth } from '@ea11y-apps/global/hooks/use-auth';
import { NotConnectedImage } from '@ea11y-apps/scanner/images';
import {
ReconnectDescription,
StateContainer,
} from '@ea11y-apps/scanner/styles/app.styles';
import { __ } from '@wordpress/i18n';
export const NotConnectedMessage = () => {
const { redirectToConnect } = useAuth();
return (
<StateContainer>
<NotConnectedImage />
<Typography variant="subtitle1" color="text.secondary">
{__('You may be logged in elsewhere', 'pojo-accessibility')}
</Typography>
<ReconnectDescription variant="body2" color="text.secondary">
{__(
"Check that you're using the right Ally account or reconnect now.",
'pojo-accessibility',
)}
</ReconnectDescription>
<Button
size="small"
color="info"
variant="contained"
onClick={redirectToConnect}
>
{__('Reconnect now', 'pojo-accessibility')}
</Button>
</StateContainer>
);
};