mirror of
https://github.com/responsively-org/responsively-app
synced 2024-09-20 06:11:56 +00:00
fix: removed deprecated field and used userAgent
This commit is contained in:
parent
228607cbea
commit
43388c795e
1 changed files with 1 additions and 2 deletions
|
@ -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 `⌘`;
|
||||
|
|
Loading…
Reference in a new issue