Files
pezkuwi-extension/packages/extension-ui/src/Popup/Authorize/NoAccount.tsx
T
pezkuwichain 5d54192e6d chore: update copyright years to 2026 and fix lint issues
- Update all copyright headers from 2025 to 2026
- Fix @polkadot references to @pezkuwi in config files
- Fix eslint.config.js import path

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 01:22:46 +03:00

48 lines
1.1 KiB
TypeScript

// Copyright 2019-2026 @pezkuwi/extension-ui authors & contributors
// SPDX-License-Identifier: Apache-2.0
import { t } from 'i18next';
import React, { useCallback } from 'react';
import { Trans } from 'react-i18next';
import { Button, Warning } from '../../components/index.js';
import { rejectAuthRequest } from '../../messaging.js';
import { styled } from '../../styled.js';
interface Props {
authId: string;
className?: string;
}
function NoAccount ({ authId, className }: Props): React.ReactElement<Props> {
const _onClick = useCallback(() => {
rejectAuthRequest(authId).catch(console.error);
}, [authId]
);
return (
<div className={className}>
<Warning className='warningMargin'>
<Trans>You do not have any account. Please create an account and refresh the application&apos;s page.</Trans>
</Warning>
<Button
className='acceptButton'
onClick={_onClick}
>
{t('Understood')}
</Button>
</div>
);
}
export default styled(NoAccount)<Props>`
.acceptButton {
width: 90%;
margin: 25px auto 0;
}
.warningMargin {
margin: 1rem 24px 0 1.45rem;
}
`;