diff --git a/examples/react/vite.config.js.timestamp-1715364539653-a9974b0d24473.mjs b/examples/react/vite.config.js.timestamp-1715364539653-a9974b0d24473.mjs new file mode 100644 index 00000000..5effa665 --- /dev/null +++ b/examples/react/vite.config.js.timestamp-1715364539653-a9974b0d24473.mjs @@ -0,0 +1,45 @@ +// vite.config.js +import { defineConfig } from "file:///home/samuele/repos/kit/node_modules/.pnpm/vite@5.2.11_@types+node@20.12.11_terser@5.31.0/node_modules/vite/dist/node/index.js"; +import dns from "dns"; +import react from "file:///home/samuele/repos/kit/node_modules/.pnpm/@vitejs+plugin-react@4.2.1_vite@5.2.11_@types+node@20.12.11_terser@5.31.0_/node_modules/@vitejs/plugin-react/dist/index.mjs"; +import { nodePolyfills } from "file:///home/samuele/repos/kit/node_modules/.pnpm/vite-plugin-node-polyfills@0.21.0_rollup@4.17.2_vite@5.2.11_@types+node@20.12.11_terser@5.31.0_/node_modules/vite-plugin-node-polyfills/dist/index.js"; +import viteTsconfigPaths from "file:///home/samuele/repos/kit/node_modules/.pnpm/vite-tsconfig-paths@4.3.2_typescript@5.4.5_vite@5.2.11_@types+node@20.12.11_terser@5.31.0_/node_modules/vite-tsconfig-paths/dist/index.mjs"; +import svgrPlugin from "file:///home/samuele/repos/kit/node_modules/.pnpm/vite-plugin-svgr@4.2.0_rollup@4.17.2_typescript@5.4.5_vite@5.2.11_@types+node@20.12.11_terser@5.31.0_/node_modules/vite-plugin-svgr/dist/index.js"; +dns.setDefaultResultOrder("verbatim"); +var vite_config_default = defineConfig(() => { + return { + plugins: [ + react(), + nodePolyfills({ + include: ["buffer"], + globals: { + Buffer: true + } + }), + viteTsconfigPaths(), + svgrPlugin() + ], + define: { + "process.env.PACKAGE_VERSION": JSON.stringify(process.env.npm_package_version) + }, + resolve: { + dedupe: ["wagmi", "viem"] + }, + build: { + minify: false + }, + server: { + minify: false, + port: 4444, + fs: { + // Allow serving files from one level up to the project root + allow: [".."] + } + }, + base: "" + }; +}); +export { + vite_config_default as default +}; +//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BQUFBLFVBQ1AsUUFBUTtBQUFBLFFBQ1Y7QUFBQSxNQUNGLENBQUM7QUFBQSxNQUNELGtCQUFrQjtBQUFBLE1BQ2xCLFdBQVc7QUFBQSxJQUNiO0FBQUEsSUFDQSxRQUFRO0FBQUEsTUFDTiwrQkFBK0IsS0FBSyxVQUFVLFFBQVEsSUFBSSxtQkFBbUI7QUFBQSxJQUMvRTtBQUFBLElBQ0EsU0FBUztBQUFBLE1BQ1AsUUFBUSxDQUFDLFNBQVMsTUFBTTtBQUFBLElBQzFCO0FBQUEsSUFDQSxPQUFPO0FBQUEsTUFDTCxRQUFRO0FBQUEsSUFDVjtBQUFBLElBQ0EsUUFBUTtBQUFBLE1BQ04sUUFBUTtBQUFBLE1BQ1IsTUFBTTtBQUFBLE1BQ04sSUFBSTtBQUFBO0FBQUEsUUFFRixPQUFPLENBQUMsSUFBSTtBQUFBLE1BQ2Q7QUFBQSxJQUNGO0FBQUEsSUFDQSxNQUFNO0FBQUEsRUFDUjtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/packages/kit/src/components/KitProvider/ConnectWalletContent/GoogleLogo.tsx b/packages/kit/src/components/KitProvider/ConnectWalletContent/GoogleLogo.tsx new file mode 100644 index 00000000..2089f867 --- /dev/null +++ b/packages/kit/src/components/KitProvider/ConnectWalletContent/GoogleLogo.tsx @@ -0,0 +1,13 @@ +import React from 'react' + +export const GoogleLogo = () => ( + + + + + + + + + +) diff --git a/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx b/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx index 04a8885a..df02c367 100644 --- a/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx +++ b/packages/kit/src/components/KitProvider/ConnectWalletContent/index.tsx @@ -23,6 +23,7 @@ import { appleAuthHelpers, useScript } from 'react-apple-signin-auth' import { ExtendedWalletList } from './ExtendedWalletList' import { Banner } from './Banner' +import { GoogleLogo } from './GoogleLogo' import { KitConfig } from '../../index' import { LocalStorageKey, defaultSignInOptions } from '../../../constants' @@ -267,21 +268,62 @@ export const ConnectWalletContent = (props: ConnectWalletContentProps) => { return ( {connector._wallet.id === 'google-waas' && ( - - { - if (credentialResponse.credential) { - storage?.setItem(LocalStorageKey.WaasGoogleIdToken, credentialResponse.credential) - onConnect(connector) - } - }} - onError={() => { - console.log('Login Failed') + + + { + if (credentialResponse.credential) { + storage?.setItem(LocalStorageKey.WaasGoogleIdToken, credentialResponse.credential) + onConnect(connector) + } + }} + onError={() => { + console.log('Login Failed') + }} + /> + + + > + + + + )}