Fix unknown country display on realtime page.

This commit is contained in:
Mike Cao 2021-02-26 21:20:47 -08:00
parent f7201c9cfc
commit 50bc2371b8

View File

@ -129,7 +129,12 @@ export default function RealtimeLog({ data, websites, websiteId }) {
id="message.log.visitor" id="message.log.visitor"
defaultMessage="Visitor from {country} using {browser} on {os} {device}" defaultMessage="Visitor from {country} using {browser} on {os} {device}"
values={{ values={{
country: <b>{countryNames[country]}</b>, country: (
<b>
{countryNames[country] ||
intl.formatMessage({ id: 'label.unknown', defaultMessage: 'Unknown' })}
</b>
),
browser: <b>{BROWSERS[browser]}</b>, browser: <b>{BROWSERS[browser]}</b>,
os: <b>{os}</b>, os: <b>{os}</b>,
device: <b>{intl.formatMessage(devices[device])?.toLowerCase()}</b>, device: <b>{intl.formatMessage(devices[device])?.toLowerCase()}</b>,