mirror of
https://github.com/Lissy93/web-check.git
synced 2025-01-24 15:20:50 +01:00
Updates the UI for threats from Google Safe Browsing
This commit is contained in:
parent
8ca747c02f
commit
737639ae84
@ -32,13 +32,17 @@ const convertToDate = (dateString: string): string => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const MalwareCard = (props: {data: any, title: string, actionButtons: any }): JSX.Element => {
|
const MalwareCard = (props: {data: any, title: string, actionButtons: any }): JSX.Element => {
|
||||||
const urlHaus = props.data.urlHaus;
|
const urlHaus = props.data.urlHaus || {};
|
||||||
const phishTank = props.data.phishTank;
|
const phishTank = props.data.phishTank || {};
|
||||||
const cloudmersive = props.data.cloudmersive;
|
const cloudmersive = props.data.cloudmersive || {};
|
||||||
|
const safeBrowsing = props.data.safeBrowsing || {};
|
||||||
return (
|
return (
|
||||||
<Card heading={props.title} actionButtons={props.actionButtons}>
|
<Card heading={props.title} actionButtons={props.actionButtons}>
|
||||||
{ cloudmersive && !cloudmersive.error && (
|
{ safeBrowsing && !safeBrowsing.error && (
|
||||||
<Row lbl="Threat Type" val={cloudmersive.WebsiteThreatType} />
|
<Row lbl="Google Safe Browsing" val={safeBrowsing.unsafe ? '❌ Unsafe' : '✅ Safe'} />
|
||||||
|
)}
|
||||||
|
{ ((cloudmersive && !cloudmersive.error) || safeBrowsing?.details) && (
|
||||||
|
<Row lbl="Threat Type" val={safeBrowsing?.details?.threatType || cloudmersive.WebsiteThreatType || 'None :)'} />
|
||||||
)}
|
)}
|
||||||
{ phishTank && !phishTank.error && (
|
{ phishTank && !phishTank.error && (
|
||||||
<Row lbl="Phishing Status" val={phishTank.url0 ? '❌ Phishing Identified' : '✅ No Phishing Identified!'} />
|
<Row lbl="Phishing Status" val={phishTank.url0 ? '❌ Phishing Identified' : '✅ No Phishing Identified!'} />
|
||||||
|
Loading…
Reference in New Issue
Block a user