mirror of
https://github.com/pezkuwichain/pezkuwi-extension.git
synced 2026-04-22 03:17:58 +00:00
5d54192e6d
- 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>
48 lines
1.1 KiB
TypeScript
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'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;
|
|
}
|
|
`;
|