This commit is contained in:
Bill He 2024-01-18 19:55:43 -08:00
parent 8235c64c93
commit 57edb711d5
No known key found for this signature in database
GPG Key ID: 73AEEF9D79E5BBF8
5 changed files with 1731 additions and 12 deletions

1
dev-dist/registerSW.js Normal file
View File

@ -0,0 +1 @@
if('serviceWorker' in navigator) navigator.serviceWorker.register('/dev-sw.js?dev-sw', { scope: '/', type: 'classic' })

View File

@ -153,6 +153,7 @@
"url-polyfill": "^1.1.12",
"util": "^0.12.5",
"vite": "^4.3.9",
"vite-plugin-pwa": "^0.17.4",
"vite-plugin-svgr": "^3.2.0",
"vitest": "^0.32.2",
"w3name": "^1.0.8",

1723
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,4 @@
import { useState } from 'react';
import styled, { AnyStyledComponent } from 'styled-components';
import { useDispatch } from 'react-redux';
import { AlertType } from '@/constants/alerts';
import { STRING_KEYS } from '@/constants/localization';
@ -13,12 +11,11 @@ import { Button } from '@/components/Button';
import { Icon } from '@/components/Icon';
import { Link } from '@/components/Link';
import { useAccounts, useStringGetter, useURLConfigs } from '@/hooks';
import { useAccounts, useBreakpoints, useStringGetter, useURLConfigs } from '@/hooks';
import { useDisplayedWallets } from '@/hooks/useDisplayedWallets';
import { breakpoints } from '@/styles';
import { layoutMixins } from '@/styles/layoutMixins';
import { usePrivy } from '@privy-io/react-auth';
export const ChooseWallet = () => {
const stringGetter = useStringGetter();
@ -27,8 +24,8 @@ export const ChooseWallet = () => {
const displayedWallets = useDisplayedWallets();
const { selectWalletType, selectedWalletType, selectedWalletError } = useAccounts();
const { ready, authenticated } = usePrivy();
const { isMobile } = useBreakpoints();
return (
<>
@ -62,7 +59,7 @@ export const ChooseWallet = () => {
<div>
{walletType !== WalletType.Privy && import.meta.env.VITE_PRIVY_APP_ID
? stringGetter({ key: wallets[walletType].stringKey })
: 'Socials (Email, SMS, etc.)'}
: `Socials ${isMobile ? '' : '(Email, SMS, etc.)'}`}
</div>
</Styled.WalletButton>
))}

View File

@ -2,6 +2,7 @@ import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import svgr from 'vite-plugin-svgr';
import { VitePWA } from 'vite-plugin-pwa';
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => ({
@ -50,6 +51,12 @@ export default defineConfig(({ mode }) => ({
svgr({
exportAsDefault: true,
}),
VitePWA({
registerType: 'autoUpdate',
devOptions: {
enabled: true,
},
}),
],
publicDir: 'public',
}));