Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import useTranslation from '@polkadot/extension-ui/hooks/useTranslation'
import React from 'react'
import { Trans } from 'react-i18next'
import { useParams } from 'react-router'
import styled from 'styled-components'
import Header from '../components/Header'
import type { ExtThemeProps } from '../types'
interface WebsiteState {
website: string
}
const PhishingDetected: React.FC<ExtThemeProps> = ({ className }) => {
const { t } = useTranslation()
const { website } = useParams<WebsiteState>()
const decodedWebsite = decodeURIComponent(website)
return (
<>
<Header text={t<string>('Phishing detected')} />
<div className={className}>
<p>
{t<string>(
'You have been redirected because the Polkadot{.js} extension believes that this website could compromise the security of your accounts and your tokens.'
)}
</p>
<p className='websiteAddress'>{decodedWebsite}</p>
<p>
<Trans i18nKey='phishing.incorrect'>
Note that this website was reported on a community-driven, curated
list. It might be incomplete or inaccurate. If you think that this
website was flagged incorrectly,{' '}
<a href='https://github.com/polkadot-js/phishing/issues/new'>
please open an issue by clicking here
</a>
.
</Trans>
</p>
</div>
</>
)
}
export default styled(PhishingDetected)`
p {
color: ${({ theme }: ExtThemeProps) => theme.subTextColor};
margin-bottom: 1rem;
margin-top: 0;
a {
color: ${({ theme }: ExtThemeProps) => theme.subTextColor};
}
&.websiteAddress {
font-size: 1.3rem;
text-align: center;
}
}
`