From 6f8de7294016455ffdf5f466570f9180461e21cf Mon Sep 17 00:00:00 2001 From: Barbara Gimeno Date: Fri, 3 Nov 2023 15:45:09 +0100 Subject: [PATCH] Add modification to Loading.test.tsx --- src/components/Loading/Loading.test.tsx | 9 ++++++--- .../store/{UiContextWrapped.tsx => UiContextWrapper.tsx} | 2 +- src/main.tsx | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) rename src/features/Ui/store/{UiContextWrapped.tsx => UiContextWrapper.tsx} (84%) diff --git a/src/components/Loading/Loading.test.tsx b/src/components/Loading/Loading.test.tsx index 37db39c..c5a1df0 100644 --- a/src/components/Loading/Loading.test.tsx +++ b/src/components/Loading/Loading.test.tsx @@ -3,6 +3,7 @@ import Loading from "./Loading"; import { ThemeProvider } from "styled-components"; import mainTheme from "../../styles/mainTheme"; import { BrowserRouter } from "react-router-dom"; +import UiContextWrapped from "../../features/Ui/store/UiContextWrapper"; describe("Given a Loading component", () => { describe("When is render", () => { @@ -12,9 +13,11 @@ describe("Given a Loading component", () => { render( - - - {" "} + + + + {" "} + , ); diff --git a/src/features/Ui/store/UiContextWrapped.tsx b/src/features/Ui/store/UiContextWrapper.tsx similarity index 84% rename from src/features/Ui/store/UiContextWrapped.tsx rename to src/features/Ui/store/UiContextWrapper.tsx index 47ce872..6110be0 100644 --- a/src/features/Ui/store/UiContextWrapped.tsx +++ b/src/features/Ui/store/UiContextWrapper.tsx @@ -4,7 +4,7 @@ import { PropsWithChildren, useState } from "react"; const UiContextWrapped = ({ children, }: PropsWithChildren): React.ReactElement => { - const [isLoading, setIsLoading] = useState(false); + const [isLoading, setIsLoading] = useState(false); return ( diff --git a/src/main.tsx b/src/main.tsx index c8c3683..d8cc4f5 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -7,7 +7,7 @@ import mainTheme from "./styles/mainTheme"; import CharacarterWrapper from "./features/characters/store/CharactersWrapper"; import GlobalStyle from "./styles/GlobalStyle"; import "@fontsource-variable/changa"; -import UiContextWrapped from "./features/Ui/store/UiContextWrapped"; +import UiContextWrapped from "./features/Ui/store/UiContextWrapper"; ReactDOM.createRoot(document.getElementById("root")!).render(