diff --git a/src/App.tsx b/src/App.tsx index 7af3d2a..38f6425 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -41,7 +41,7 @@ import { } from "./App-styles"; import { Spacer } from "./common/Spacer"; import { Loader } from "./components/Loader"; -import { PasswordField } from "./components"; +import { PasswordField, ErrorText } from "./components"; type extStates = | "not-authenticated" @@ -805,12 +805,7 @@ function App() { /> - {sendPaymentError} + {sendPaymentError} {/* {sendPaymentSuccess} */} - {sendPaymentError} + {sendPaymentError} )} {extState === "web-app-request-connection" && ( @@ -1073,9 +1068,9 @@ function App() { Authenticate - + {walletToBeDecryptedError} - + )} @@ -1144,9 +1139,9 @@ function App() { Confirm password - + {walletToBeDownloadedError} - + )} @@ -1229,9 +1224,9 @@ function App() { Create Account - + {walletToBeDownloadedError} - + )} diff --git a/src/components/ErrorText/ErrorText.spec.tsx b/src/components/ErrorText/ErrorText.spec.tsx new file mode 100644 index 0000000..bc098ea --- /dev/null +++ b/src/components/ErrorText/ErrorText.spec.tsx @@ -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(An Error has occured!) + expect(queryByTestId('test-id')?.textContent).toEqual('An Error has occured!') + }) +}) \ No newline at end of file diff --git a/src/components/ErrorText/ErrorText.tsx b/src/components/ErrorText/ErrorText.tsx new file mode 100644 index 0000000..cc3d458 --- /dev/null +++ b/src/components/ErrorText/ErrorText.tsx @@ -0,0 +1,7 @@ +import { Typography, TypographyProps, } from "@mui/material"; + +export const ErrorText: React.FunctionComponent = ({ ...props }) => { + return ( + + ) +} \ No newline at end of file diff --git a/src/components/index.ts b/src/components/index.ts index 1d947d7..4764f6c 100644 --- a/src/components/index.ts +++ b/src/components/index.ts @@ -1 +1,2 @@ -export * from './PasswordField/PasswordField'; \ No newline at end of file +export * from './PasswordField/PasswordField'; +export * from './ErrorText/ErrorText'; \ No newline at end of file