가상매매 시간봉 제거

This commit is contained in:
Macbook
2026-05-28 20:48:28 +09:00
parent 7e3644cb62
commit 15160f7d2c
45 changed files with 996 additions and 405 deletions
+28
View File
@@ -0,0 +1,28 @@
import { useEffect, useState } from 'react';
import { Capacitor } from '@capacitor/core';
import { App } from '@capacitor/app';
/** 네이티브: build.gradle versionName / versionCode · 웹: dev */
export function useAppVersion(): string {
const [label, setLabel] = useState('…');
useEffect(() => {
void (async () => {
if (Capacitor.isNativePlatform()) {
try {
const { version, build } = await App.getInfo();
setLabel(build ? `${version} (build ${build})` : version);
return;
} catch {
/* fallback */
}
}
setLabel(
(import.meta as ImportMeta & { env?: { VITE_APP_VERSION?: string } }).env
?.VITE_APP_VERSION ?? 'web',
);
})();
}, []);
return label;
}