Log commit hash
This commit is contained in:
parent
0e9c3a07fd
commit
8f7fc888a9
@ -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,
|
||||
);
|
||||
|
@ -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);
|
||||
|
@ -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 });
|
||||
|
@ -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(),
|
||||
),
|
||||
},
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user