Skip to content

Commit dc20323

Browse files
committed
Fix version display in debug info
1 parent 47e028d commit dc20323

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/components/Account/DebugInfo.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const DebugInfo: React.FC<React.PropsWithChildren<{ gitRevision: string |
1919
gitRevision,
2020
}) => {
2121
const { t } = useTranslation('common');
22-
const [newVersion, setNewVersion] = React.useState<string | null>('v1.6.3');
22+
const [newVersion, setNewVersion] = React.useState<string | null>(null);
2323

2424
useEffect(() => {
2525
// Check github releases API for latest version
@@ -48,10 +48,8 @@ export const DebugInfo: React.FC<React.PropsWithChildren<{ gitRevision: string |
4848
if (gitRevision) {
4949
debugInfo.push(`${t('account.debug_info_details.git')}: ${gitRevision}`);
5050
}
51-
if (process.env.NEXT_PUBLIC_VERSION) {
52-
debugInfo.push(
53-
`${t('account.debug_info_details.version')} ${process.env.NEXT_PUBLIC_VERSION}`,
54-
);
51+
if (env.NEXT_PUBLIC_VERSION) {
52+
debugInfo.push(`${t('account.debug_info_details.version')} ${env.NEXT_PUBLIC_VERSION}`);
5553
}
5654
try {
5755
void navigator.clipboard.writeText(debugInfo.join('\n'));
@@ -80,7 +78,7 @@ export const DebugInfo: React.FC<React.PropsWithChildren<{ gitRevision: string |
8078
{gitRevision}
8179
</pre>
8280
)}
83-
{process.env.NEXT_PUBLIC_VERSION && (
81+
{env.NEXT_PUBLIC_VERSION && (
8482
<pre className="text-wrap">
8583
{t('account.debug_info_details.version')}:<br />
8684
{env.NEXT_PUBLIC_VERSION}

0 commit comments

Comments
 (0)