// Copyright 2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; import type { LocalizerType } from '../types/Util'; import { useEscapeHandling } from '../hooks/useEscapeHandling'; export type AboutProps = Readonly<{ closeAbout: () => unknown; appEnv: string; arch: string; platform: string; i18n: LocalizerType; version: string; }>; export function About({ closeAbout, appEnv, arch, platform, i18n, version, }: AboutProps): JSX.Element { useEscapeHandling(closeAbout); let env: string; if (platform === 'darwin') { if (arch === 'arm64') { env = i18n('icu:About__AppEnvironment--AppleSilicon', { appEnv }); } else { env = i18n('icu:About__AppEnvironment--AppleIntel', { appEnv }); } } else { env = i18n('icu:About__AppEnvironment', { appEnv }); } return (