import { useTranslation } from 'react-i18next';
import { currentAppVersion } from '../../lib/app-version';
const commitRef = `${import.meta.env.VITE_COMMIT_REF || ''}`.trim();
const shortCommitRef = commitRef.slice(0, 7);
const isElectron = window.electronApi?.isElectron === true;
const Version = () => {
const { t } = useTranslation();
return (
<>
v{currentAppVersion}
{shortCommitRef ? (
#{shortCommitRef}
) : null}
{isElectron && (
<>
{' '}
-{' '}
{t('node_stats')}
>
)}
>
);
};
export default Version;