2022-02-22 22:31:37 +01:00
|
|
|
import { defineMessages } from 'react-intl';
|
2020-09-16 05:34:30 +02:00
|
|
|
|
|
|
|
export const labels = defineMessages({
|
|
|
|
unknown: { id: 'label.unknown', defaultMessage: 'Unknown' },
|
|
|
|
});
|
|
|
|
|
|
|
|
export const devices = defineMessages({
|
2020-09-17 08:06:10 +02:00
|
|
|
desktop: { id: 'metrics.device.desktop', defaultMessage: 'Desktop' },
|
|
|
|
laptop: { id: 'metrics.device.laptop', defaultMessage: 'Laptop' },
|
|
|
|
tablet: { id: 'metrics.device.tablet', defaultMessage: 'Tablet' },
|
|
|
|
mobile: { id: 'metrics.device.mobile', defaultMessage: 'Mobile' },
|
2020-09-16 05:34:30 +02:00
|
|
|
});
|
|
|
|
|
|
|
|
export function getDeviceMessage(device) {
|
2022-02-22 22:31:37 +01:00
|
|
|
return devices[device] || labels.unknown;
|
2020-09-16 05:34:30 +02:00
|
|
|
}
|