import { Fragment } from 'react' import { Link } from '@app/components/general/link' import { PageIssue, Website } from '@app/types' function CtaCdn({ website, disablePlayground, authenticated, }: { website: Website & { issues: PageIssue[] } disablePlayground: boolean authenticated: boolean }) { let limitedResonse = 'Scan Complete' if (!website?.issues) { limitedResonse = 'Gathering details' } const totalCurrentIssues = website?.issuesInfo?.totalIssues || website?.issues?.length const suf = totalCurrentIssues === 1 ? '' : 's' if (!authenticated) { limitedResonse = website?.issuesInfo ? `This is a limited API response showing ${website?.issues?.length}/${ totalCurrentIssues || '_' } issue${suf} for the current page, sign in to see the full report across all pages.` : 'Gathering details' } else { limitedResonse = `This is a API response showing ${ totalCurrentIssues || '_' } issue${suf} for the current page.` } return ( {disablePlayground ? (

Get all your pages issues at once and more after signing in

) : null}

{limitedResonse}

{disablePlayground || authenticated ? null : (
Login Register
)}
) } export { CtaCdn }