diff --git a/package-lock.json b/package-lock.json index 1a653184..385681ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,18 +10,18 @@ "dependencies": { "@emotion/react": "11.11.1", "@types/dom-screen-wake-lock": "1.0.1", - "buffer": "^6.0.3", - "ethers": "6.6.7", + "buffer": "6.0.3", + "ethers": "6.7.0", "i18next": "23.4.1", "jest-environment-jsdom": "29.6.2", "react": "18.2.0", "react-dom": "18.2.0", - "react-i18next": "13.0.2" + "react-i18next": "13.0.3" }, "devDependencies": { "@brave-intl/skus-sdk": "0.1.3", "@types/jest": "29.5.3", - "@types/react": "18.2.17", + "@types/react": "18.2.18", "@types/react-dom": "18.2.7", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", @@ -29,7 +29,7 @@ "css-loader": "6.8.1", "css-minimizer-webpack-plugin": "5.0.1", "eslint": "8.46.0", - "eslint-config-prettier": "8.9.0", + "eslint-config-prettier": "8.10.0", "eslint-config-react-app": "7.0.1", "html-webpack-plugin": "5.5.3", "husky": "8.0.3", @@ -3035,9 +3035,9 @@ "dev": true }, "node_modules/@types/react": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.17.tgz", - "integrity": "sha512-u+e7OlgPPh+aryjOm5UJMX32OvB2E3QASOAqVMY6Ahs90djagxwv2ya0IctglNbNTexC12qCSMZG47KPfy1hAA==", + "version": "18.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.18.tgz", + "integrity": "sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ==", "dev": true, "dependencies": { "@types/prop-types": "*", @@ -5972,9 +5972,9 @@ } }, "node_modules/eslint-config-prettier": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.9.0.tgz", - "integrity": "sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, "bin": { "eslint-config-prettier": "bin/cli.js" @@ -6394,9 +6394,9 @@ } }, "node_modules/ethers": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.6.7.tgz", - "integrity": "sha512-1SdT3W5/IPAcx9l5/+9qKRYR/iqVIdNQIct18yeh+XvN+I4RK44mvOsAerMwJYCAwdQfsOgf3OkfozeuMInbtQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.0.tgz", + "integrity": "sha512-pxt5hK82RNwcTX2gOZP81t6qVPVspnkpeivwEgQuK9XUvbNtghBnT8GNIb/gPh+WnVSfi8cXC9XlfT8sqc6D6w==", "funding": [ { "type": "individual", @@ -7629,9 +7629,9 @@ } }, "node_modules/is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "dependencies": { "has": "^1.0.3" }, @@ -10648,9 +10648,9 @@ } }, "node_modules/react-i18next": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.0.2.tgz", - "integrity": "sha512-NEVxC32v0oR4egwYM0QM0WE93AiJG5r0NTXTL8mhQfAhsMfDS2fSO6jpluyfsfypP988KzUQrAXncspcJ7+GHA==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.0.3.tgz", + "integrity": "sha512-/t4kt4Y2o+21hbvx+o9zpVnmoiud7KLDncyZFGN0U6TGAWYaXdTsp/ytAHFcKKSAODg4noIMaOO3X7bMgCqLHw==", "dependencies": { "@babel/runtime": "^7.22.5", "html-parse-stringify": "^3.0.1" @@ -10844,11 +10844,11 @@ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "dependencies": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" }, @@ -15171,9 +15171,9 @@ "dev": true }, "@types/react": { - "version": "18.2.17", - "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.17.tgz", - "integrity": "sha512-u+e7OlgPPh+aryjOm5UJMX32OvB2E3QASOAqVMY6Ahs90djagxwv2ya0IctglNbNTexC12qCSMZG47KPfy1hAA==", + "version": "18.2.18", + "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.18.tgz", + "integrity": "sha512-da4NTSeBv/P34xoZPhtcLkmZuJ+oYaCxHmyHzwaDQo9RQPBeXV+06gEk2FpqEcsX9XrnNLvRpVh6bdavDSjtiQ==", "dev": true, "requires": { "@types/prop-types": "*", @@ -17324,9 +17324,9 @@ } }, "eslint-config-prettier": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.9.0.tgz", - "integrity": "sha512-+sbni7NfVXnOpnRadUA8S28AUlsZt9GjgFvABIRL9Hkn8KqNzOp+7Lw4QWtrwn20KzU3wqu1QoOj2m+7rKRqkA==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", "dev": true, "requires": {} }, @@ -17616,9 +17616,9 @@ "dev": true }, "ethers": { - "version": "6.6.7", - "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.6.7.tgz", - "integrity": "sha512-1SdT3W5/IPAcx9l5/+9qKRYR/iqVIdNQIct18yeh+XvN+I4RK44mvOsAerMwJYCAwdQfsOgf3OkfozeuMInbtQ==", + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/ethers/-/ethers-6.7.0.tgz", + "integrity": "sha512-pxt5hK82RNwcTX2gOZP81t6qVPVspnkpeivwEgQuK9XUvbNtghBnT8GNIb/gPh+WnVSfi8cXC9XlfT8sqc6D6w==", "requires": { "@adraffy/ens-normalize": "1.9.2", "@noble/hashes": "1.1.2", @@ -18518,9 +18518,9 @@ "dev": true }, "is-core-module": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", - "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", "requires": { "has": "^1.0.3" } @@ -20667,9 +20667,9 @@ } }, "react-i18next": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.0.2.tgz", - "integrity": "sha512-NEVxC32v0oR4egwYM0QM0WE93AiJG5r0NTXTL8mhQfAhsMfDS2fSO6jpluyfsfypP988KzUQrAXncspcJ7+GHA==", + "version": "13.0.3", + "resolved": "https://registry.npmjs.org/react-i18next/-/react-i18next-13.0.3.tgz", + "integrity": "sha512-/t4kt4Y2o+21hbvx+o9zpVnmoiud7KLDncyZFGN0U6TGAWYaXdTsp/ytAHFcKKSAODg4noIMaOO3X7bMgCqLHw==", "requires": { "@babel/runtime": "^7.22.5", "html-parse-stringify": "^3.0.1" @@ -20817,11 +20817,11 @@ "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "resolve": { - "version": "1.22.2", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", - "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", "requires": { - "is-core-module": "^2.11.0", + "is-core-module": "^2.13.0", "path-parse": "^1.0.7", "supports-preserve-symlinks-flag": "^1.0.0" } diff --git a/package.json b/package.json index 0463d237..565a6931 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "devDependencies": { "@brave-intl/skus-sdk": "0.1.3", "@types/jest": "29.5.3", - "@types/react": "18.2.17", + "@types/react": "18.2.18", "@types/react-dom": "18.2.7", "@typescript-eslint/eslint-plugin": "5.62.0", "@typescript-eslint/parser": "5.62.0", @@ -32,7 +32,7 @@ "css-loader": "6.8.1", "css-minimizer-webpack-plugin": "5.0.1", "eslint": "8.46.0", - "eslint-config-prettier": "8.9.0", + "eslint-config-prettier": "8.10.0", "eslint-config-react-app": "7.0.1", "html-webpack-plugin": "5.5.3", "husky": "8.0.3", @@ -54,11 +54,11 @@ "@emotion/react": "11.11.1", "@types/dom-screen-wake-lock": "1.0.1", "buffer": "6.0.3", - "ethers": "6.6.7", + "ethers": "6.7.0", "i18next": "23.4.1", "jest-environment-jsdom": "29.6.2", "react": "18.2.0", "react-dom": "18.2.0", - "react-i18next": "13.0.2" + "react-i18next": "13.0.3" } } diff --git a/src/components/WelcomeScreen.tsx b/src/components/WelcomeScreen.tsx index d4ccc965..eb348aa6 100644 --- a/src/components/WelcomeScreen.tsx +++ b/src/components/WelcomeScreen.tsx @@ -1,4 +1,5 @@ import React, { DispatchWithoutAction } from "react"; +import { css } from "@emotion/react"; import { useSubscribedStatus } from "../hooks/use-subscribed-status"; import { Background } from "./Background"; import { Footer } from "./Footer"; @@ -89,61 +90,63 @@ export const WelcomeScreen: React.FC = ({ } if (isWeb3Call && web3Account === null) { - const popupContainerStyle: React.CSSProperties = { - position: "fixed", - top: 0, - left: 0, - right: 0, - bottom: 0, - background: "rgba(0, 0, 0, 0.5)", - display: "flex", - justifyContent: "center", - alignItems: "center", - zIndex: 9999, - }; - const popupContentStyle: React.CSSProperties = { - background: "white", - padding: "20px", - borderRadius: "5px", - textAlign: "center", - }; - - const buttonContainerStyle: React.CSSProperties = { - marginTop: "20px", - display: "flex", - justifyContent: "center", - }; - - const buttonStyle: React.CSSProperties = { - margin: "0 10px", - padding: "10px 20px", - border: "solid 1px #ccc", - borderRadius: "10px", - backgroundColor: "transparent", - color: "black", - cursor: "pointer", - display: "flex", - flexDirection: "column", - alignItems: "center", - overflow: "hidden", - flex: 1, - }; - - const buttonWrapperStyle: React.CSSProperties = { - display: "flex", - width: "100%", - }; - - const logoStyle: React.CSSProperties = { - width: "50px", - height: "50px", - marginBottom: "10px", - borderRadius: "50%", - }; + // Define styles using the css prop + const popupContainerStyle = css` + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + display: flex; + justify-content: center; + align-items: center; + z-index: 9999; + `; + + const popupContentStyle = css` + background: white; + padding: 20px; + border-radius: 5px; + text-align: center; + `; + + const buttonContainerStyle = css` + margin-top: 20px; + display: flex; + justify-content: center; + `; + + const buttonStyle = css` + margin: 0 10px; + padding: 10px 20px; + border: solid 1px #ccc; + border-radius: 10px; + background-color: transparent; + color: black; + cursor: pointer; + display: flex; + flex-direction: column; + align-items: center; + overflow: hidden; + flex: 1; + `; + + const buttonWrapperStyle = css` + display: flex; + width: 100%; + `; + + const logoStyle = css` + width: 50px; + height: 50px; + margin-bottom: 10px; + border-radius: 50%; + `; return ( -
-
+
+
Web3 Account @@ -152,23 +155,23 @@ export const WelcomeScreen: React.FC = ({ variant="body" children={t("web3_account_body")} /> -
-
- -