Log commit hash

This commit is contained in:
Gilbert 2024-06-04 12:03:22 -05:00
parent 0e9c3a07fd
commit 8f7fc888a9
4 changed files with 12 additions and 0 deletions

View File

@ -15,6 +15,9 @@ import { SERVER_GQL_PATH } from './constants';
import { Toaster } from 'components/shared/Toast';
import { LogErrorBoundary } from 'utils/log-error';
// @ts-ignore
console.log(`v-${__VERSION__}`);
const root = ReactDOM.createRoot(
document.getElementById('root') as HTMLElement,
);

View File

@ -47,7 +47,9 @@ export const Login = ({ onDone }: Props) => {
console.log('Handling google redirect back');
try {
await google.handleOAuthRedirectBack();
// @ts-ignore
wallet = await google.getEthersWallet();
// @ts-ignore
const result = await signInWithEthereum(1, 'login', wallet);
if (result.error) {
setError(result.error);

View File

@ -39,7 +39,9 @@ export const SignUp = ({ onDone }: Props) => {
setProvider('google');
try {
await google.handleOAuthRedirectBack();
// @ts-ignore
wallet = await google.getEthersWallet();
// @ts-ignore
const result = await signInWithEthereum(1, 'signup', wallet);
if (result.error) {
setError({ type: 'provider', message: result.error });

View File

@ -1,5 +1,7 @@
import { defineConfig, PluginOption } from 'vite';
import react from '@vitejs/plugin-react';
import { exec } from 'child_process';
import { promisify } from 'util';
// https://vitejs.dev/config/
export default defineConfig({
@ -16,5 +18,8 @@ export default defineConfig({
},
define: {
'process.env': {},
__VERSION__: JSON.stringify(
(await promisify(exec)('git rev-parse --short HEAD')).stdout.trim(),
),
},
});