mirror of
https://github.com/Qortal/chrome-extension.git
synced 2025-02-11 17:55:49 +00:00
Merge branch 'master' of https://github.com/Qortal/chrome-extension
This commit is contained in:
commit
6c2c3e02be
23
src/App.tsx
23
src/App.tsx
@ -41,7 +41,7 @@ import {
|
|||||||
} from "./App-styles";
|
} from "./App-styles";
|
||||||
import { Spacer } from "./common/Spacer";
|
import { Spacer } from "./common/Spacer";
|
||||||
import { Loader } from "./components/Loader";
|
import { Loader } from "./components/Loader";
|
||||||
import { PasswordField } from "./components";
|
import { PasswordField, ErrorText } from "./components";
|
||||||
|
|
||||||
type extStates =
|
type extStates =
|
||||||
| "not-authenticated"
|
| "not-authenticated"
|
||||||
@ -805,12 +805,7 @@ function App() {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<Spacer height="10px" />
|
<Spacer height="10px" />
|
||||||
<Typography sx={{
|
<ErrorText>{sendPaymentError}</ErrorText>
|
||||||
color: "red",
|
|
||||||
fontSize: "12px",
|
|
||||||
fontFamily: "Inter",
|
|
||||||
fontWeight: '600'
|
|
||||||
}}>{sendPaymentError}</Typography>
|
|
||||||
{/* <Typography>{sendPaymentSuccess}</Typography> */}
|
{/* <Typography>{sendPaymentSuccess}</Typography> */}
|
||||||
<Spacer height="25px" />
|
<Spacer height="25px" />
|
||||||
<CustomButton
|
<CustomButton
|
||||||
@ -893,7 +888,7 @@ function App() {
|
|||||||
decline
|
decline
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography color="errror">{sendPaymentError}</Typography>
|
<ErrorText>{sendPaymentError}</ErrorText>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
{extState === "web-app-request-connection" && (
|
{extState === "web-app-request-connection" && (
|
||||||
@ -1073,9 +1068,9 @@ function App() {
|
|||||||
<CustomButton onClick={authenticateWallet} >
|
<CustomButton onClick={authenticateWallet} >
|
||||||
Authenticate
|
Authenticate
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<Typography color="error">
|
<ErrorText>
|
||||||
{walletToBeDecryptedError}
|
{walletToBeDecryptedError}
|
||||||
</Typography>
|
</ErrorText>
|
||||||
</>
|
</>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
@ -1144,9 +1139,9 @@ function App() {
|
|||||||
<CustomButton onClick={confirmPasswordToDownload}>
|
<CustomButton onClick={confirmPasswordToDownload}>
|
||||||
Confirm password
|
Confirm password
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<Typography color="error">
|
<ErrorText>
|
||||||
{walletToBeDownloadedError}
|
{walletToBeDownloadedError}
|
||||||
</Typography>
|
</ErrorText>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
@ -1229,9 +1224,9 @@ function App() {
|
|||||||
<CustomButton onClick={createAccountFunc}>
|
<CustomButton onClick={createAccountFunc}>
|
||||||
Create Account
|
Create Account
|
||||||
</CustomButton>
|
</CustomButton>
|
||||||
<Typography color="error">
|
<ErrorText>
|
||||||
{walletToBeDownloadedError}
|
{walletToBeDownloadedError}
|
||||||
</Typography>
|
</ErrorText>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
17
src/components/ErrorText/ErrorText.spec.tsx
Normal file
17
src/components/ErrorText/ErrorText.spec.tsx
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import {
|
||||||
|
describe,
|
||||||
|
expect,
|
||||||
|
test
|
||||||
|
} from 'vitest';
|
||||||
|
import { render } from '@testing-library/react'
|
||||||
|
import {
|
||||||
|
ErrorText
|
||||||
|
} from './ErrorText'
|
||||||
|
|
||||||
|
|
||||||
|
describe('ErrorText', () => {
|
||||||
|
test('it renders with the text', () => {
|
||||||
|
const { queryByTestId } = render(<ErrorText data-testid="test-id">An Error has occured!</ErrorText>)
|
||||||
|
expect(queryByTestId('test-id')?.textContent).toEqual('An Error has occured!')
|
||||||
|
})
|
||||||
|
})
|
7
src/components/ErrorText/ErrorText.tsx
Normal file
7
src/components/ErrorText/ErrorText.tsx
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
import { Typography, TypographyProps, } from "@mui/material";
|
||||||
|
|
||||||
|
export const ErrorText: React.FunctionComponent<TypographyProps> = ({ ...props }) => {
|
||||||
|
return (
|
||||||
|
<Typography color="error" {...props} />
|
||||||
|
)
|
||||||
|
}
|
@ -1 +1,2 @@
|
|||||||
export * from './PasswordField/PasswordField';
|
export * from './PasswordField/PasswordField';
|
||||||
|
export * from './ErrorText/ErrorText';
|
Loading…
x
Reference in New Issue
Block a user