diff --git a/packages/design-system/src/index.ts b/packages/design-system/src/index.ts index 88b2dc30..b2924bc2 100644 --- a/packages/design-system/src/index.ts +++ b/packages/design-system/src/index.ts @@ -9,7 +9,7 @@ export { MetaTile, MetaTileBody, MetaTileHeader } from './MetaTile'; export { ResponsiveText } from './ResponsiveText'; export { SelectSearch, selectStyles } from './SelectSearch'; export { SelectTimeZone } from './SelectTimeZone'; -export { SVG } from './SVG' +export { SVG } from './SVG'; export { theme as MetaTheme } from './theme'; export { H1, P } from './typography'; export { EmailIcon } from '@chakra-ui/icons'; diff --git a/packages/web/components/Setup/SetupPersonalityType.tsx b/packages/web/components/Setup/SetupPersonalityType.tsx index 274022cc..642d6494 100644 --- a/packages/web/components/Setup/SetupPersonalityType.tsx +++ b/packages/web/components/Setup/SetupPersonalityType.tsx @@ -15,7 +15,7 @@ import { useUpdateAboutYouMutation } from 'graphql/autogen/types'; import { images as BaseImages } from 'graphql/getPersonalityInfo'; import { PersonalityOption } from 'graphql/types'; import { useUser } from 'lib/hooks'; -import React, { useCallback } from 'react'; +import React, { useCallback, useState } from 'react'; export type SetupPersonalityTypeProps = { // keyed on a bitmask of the format 0bWUBRG @@ -37,10 +37,12 @@ export const SetupPersonalityType: ( const [updateAboutYouRes, updateAboutYou] = ( useUpdateAboutYouMutation() ); + const [loading, setLoading] = useState(false); const handleNextPress = useCallback(async () => { if (!user) return; + setLoading(true); if (user.player?.ColorAspect?.mask !== colorMask) { const { error } = await updateAboutYou({ playerId: user.id, @@ -188,7 +190,7 @@ export const SetupPersonalityType: ( onClick={handleNextPress} mt={10} isDisabled={colorMask === undefined} - isLoading={updateAboutYouRes.fetching} + isLoading={updateAboutYouRes.fetching || loading} loadingText="Saving" > {nextButtonLabel} diff --git a/yarn.lock b/yarn.lock index 7f616250..d6fed4ff 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10920,12 +10920,12 @@ bcrypt-pbkdf@^1.0.0: dependencies: tweetnacl "^0.14.3" -bcrypto@5.1.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/bcrypto/-/bcrypto-5.1.0.tgz#1ca3d0b1bd1ffe6bb18cfcf2a7d7fc19423b68e6" - integrity sha512-WEs5g7WHdEdLLcsvhE7Z1AXv0G+hb+bJhSUYM7samFNrH051XhcFVWxAbAZDmIU1HWjpjhmQ+HqBar7UC/qrzQ== +bcrypto@5.1.0, bcrypto@5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/bcrypto/-/bcrypto-5.2.0.tgz#7cc944d2cc2b7beeff04c74f8611a001612a981d" + integrity sha512-yy+kDrUG6aXP7NIYq7kKIwlrXtx/51488IGfuqhyM6FYF8zNI1mPRwvAPvQ1RfE5e7WW7fVdZt4yHlmN4HJ4Hg== dependencies: - bufio "~1.0.6" + bufio "~1.0.7" loady "~0.0.1" bech32@1.1.4, bech32@^1.1.2: @@ -11483,7 +11483,7 @@ buffer@^5.0.6, buffer@^5.7.0: base64-js "^1.3.1" ieee754 "^1.1.13" -bufio@~1.0.6: +bufio@~1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/bufio/-/bufio-1.0.7.tgz#b7f63a1369a0829ed64cc14edf0573b3e382a33e" integrity sha512-bd1dDQhiC+bEbEfg56IdBv7faWa6OipMs/AFFFvtFnB3wAYjlwQpQRZ0pm6ZkgtfL0pILRXhKxOiQj6UzoMR7A== @@ -28037,11 +28037,6 @@ schema-utils@^3.0.0: ajv "^6.12.5" ajv-keywords "^3.5.2" -scrypt-js@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-2.0.4.tgz#32f8c5149f0797672e551c07e230f834b6af5f16" - integrity sha512-4KsaGcPnuhtCZQCxFxN3GVYIhKFPTdLd8PLC552XwbMndtD0cjRFAhDuuydXQ0h08ZfPgzqe6EKHozpuH74iDw== - scrypt-js@3.0.1, scrypt-js@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" @@ -28215,11 +28210,6 @@ set-value@^2.0.0, set-value@^2.0.1: is-plain-object "^2.0.3" split-string "^3.0.1" -setimmediate@1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.4.tgz#20e81de622d4a02588ce0c8da8973cbcf1d3138f" - integrity sha1-IOgd5iLUoCWIzgyNqJc8vPHTE48= - setimmediate@^1.0.4, setimmediate@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" @@ -31236,11 +31226,6 @@ utils-merge@1.0.1: resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= -uuid@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac" - integrity sha1-wqMN7bPlNdcsz4LjQ5QaULqFM6w= - uuid@3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" @@ -32300,7 +32285,7 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xmlhttprequest@*, xmlhttprequest@1.8.0, xmlhttprequest@^1.8.0: +xmlhttprequest@*, xmlhttprequest@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc" integrity sha1-Z/4HXFwk/vOfnWX197f+dRcZaPw=