style: localise labels to user device (#509)

This commit is contained in:
Carlos Valente
2023-09-03 09:13:56 +02:00
committed by GitHub
parent 8d427a6bbe
commit 1de3e01216
2 changed files with 10 additions and 3 deletions
@@ -0,0 +1,6 @@
export function isMacOS() {
const userAgent = navigator.userAgent.toLowerCase();
return userAgent.includes('macintosh') || userAgent.includes('mac os');
}
export const deviceAlt = isMacOS() ? '⌥' : 'Alt';