fix: removed deprecated field and used userAgent

This commit is contained in:
surajbobade 2024-01-19 23:12:20 +05:30
parent 228607cbea
commit 43388c795e

View file

@ -5,11 +5,10 @@ interface Props {
const ShortcutButton = ({ text }: Props) => {
const btnText = text[0].split('+');
const btnTextLength = btnText.length - 1;
const { platform = '' } = navigator?.userAgentData || {};
const formatText = (value: string) => {
if (value === 'mod') {
if (platform.includes('Windows')) {
if (navigator?.userAgent?.includes('Windows')) {
return `Ctrl`;
}
return ``;