diff --git a/client/src/components/modal/ErrorModal.style.ts b/client/src/components/modal/ErrorModal.style.ts index 642851d1..da75e583 100644 --- a/client/src/components/modal/ErrorModal.style.ts +++ b/client/src/components/modal/ErrorModal.style.ts @@ -9,6 +9,6 @@ export const errorModalWrapper = css({ }); export const errorMessageItem = css({ - color: "red.500", + color: "red", fontSize: "sm", }); diff --git a/client/src/features/workSpace/WorkSpace.style.ts b/client/src/features/workSpace/WorkSpace.style.ts index 8e776b41..85cafdf1 100644 --- a/client/src/features/workSpace/WorkSpace.style.ts +++ b/client/src/features/workSpace/WorkSpace.style.ts @@ -1,10 +1,31 @@ -import { css } from "@styled-system/css"; - -export const container = css({ - display: "flex", -}); +import { css, cva } from "@styled-system/css"; export const content = css({ position: "relative", padding: "md", }); + +export const workSpaceContainer = cva({ + base: { + display: "flex", + transition: "opacity 0.3s ease-in-out", + }, + variants: { + visibility: { + visible: { + visibility: "visible", + }, + hidden: { + visibility: "hidden", + }, + }, + opacity: { + 1: { + opacity: 1, + }, + 0: { + opacity: 0, + }, + }, + }, +}); diff --git a/client/src/features/workSpace/WorkSpace.tsx b/client/src/features/workSpace/WorkSpace.tsx index 88116f25..07b3e604 100644 --- a/client/src/features/workSpace/WorkSpace.tsx +++ b/client/src/features/workSpace/WorkSpace.tsx @@ -2,31 +2,29 @@ import { BottomNavigator } from "@components/bottomNavigator/BottomNavigator"; import { ErrorModal } from "@components/modal/ErrorModal"; import { Sidebar } from "@components/sidebar/Sidebar"; import { Page } from "@features/page/Page"; -import { container, content } from "./WorkSpace.style"; +import { workSpaceContainer, content } from "./WorkSpace.style"; import { IntroScreen } from "./components/IntroScreen"; import { usePagesManage } from "./hooks/usePagesManage"; import { useWorkspaceInit } from "./hooks/useWorkspaceInit"; export const WorkSpace = () => { - const { isLoading, isInitialized } = useWorkspaceInit(); + const { isLoading, isInitialized, error } = useWorkspaceInit(); const { pages, addPage, selectPage, closePage, updatePageTitle } = usePagesManage(); const visiblePages = pages.filter((page) => page.isVisible); - const error = true; + if (error) { return ; } return ( <> - {isLoading} && + {isLoading && }
diff --git a/client/src/features/workSpace/components/IntroScreen.style.ts b/client/src/features/workSpace/components/IntroScreen.style.ts new file mode 100644 index 00000000..51604508 --- /dev/null +++ b/client/src/features/workSpace/components/IntroScreen.style.ts @@ -0,0 +1,13 @@ +import { css, cva } from "@styled-system/css"; + +export const IntroScreenContainer = css({ + display: "flex", + zIndex: 50, + position: "fixed", + inset: 0, + justifyContent: "center", + alignItems: "center", + backgroundImage: "linear-gradient(135deg, gray, green)", + backgroundSize: "cover", + transition: "opacity 0.5s ease-in-out", +}); diff --git a/client/src/features/workSpace/components/IntroScreen.tsx b/client/src/features/workSpace/components/IntroScreen.tsx index 1bcd5bb5..e3339b5d 100644 --- a/client/src/features/workSpace/components/IntroScreen.tsx +++ b/client/src/features/workSpace/components/IntroScreen.tsx @@ -1,13 +1,9 @@ -import { LoadingSpinner } from "@components/loading/LoadingSpinner"; +import { LoadingSpinner } from "@components/lotties/LoadingSpinner"; +import { IntroScreenContainer } from "./IntroScreen.style"; export const IntroScreen = () => { return ( -
+
);