Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reabsed with my branch #1207

Merged
merged 4 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 43 additions & 43 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@
"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",
"copy-webpack-plugin": "11.0.0",
"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",
Expand All @@ -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"
}
}
121 changes: 62 additions & 59 deletions src/components/WelcomeScreen.tsx
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -89,61 +90,63 @@ export const WelcomeScreen: React.FC<Props> = ({
}

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 (
<div style={popupContainerStyle}>
<div style={popupContentStyle}>
<div css={popupContainerStyle}>
<div css={popupContentStyle}>
<Text css={{ color: "black", display: "block" }} variant="header">
Web3 Account
</Text>
Expand All @@ -152,23 +155,23 @@ export const WelcomeScreen: React.FC<Props> = ({
variant="body"
children={t("web3_account_body")}
/>
<div style={buttonContainerStyle}>
<div style={buttonWrapperStyle}>
<button style={buttonStyle} onClick={onClickEthAccount}>
<div css={buttonContainerStyle}>
<div css={buttonWrapperStyle}>
<button css={buttonStyle} onClick={onClickEthAccount}>
<img
src={require("../images/ethereum.svg")}
alt="Logo"
style={logoStyle}
css={logoStyle}
/>
<Text css={{ color: "black" }} variant="body">
Ethereum
</Text>
</button>
<button style={buttonStyle} onClick={onClickSolAccount}>
<button css={buttonStyle} onClick={onClickSolAccount}>
<img
src={require("../images/solana.svg")}
alt="Logo"
style={logoStyle}
css={logoStyle}
/>
<Text css={{ color: "black" }} variant="body">
Solana
Expand Down
Loading