Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

feat: remove theme transition animation

thecodrrb2a32ddf113e
diff --git a/apps/web/src/app.js b/apps/web/src/app.js
index 11477d9c9..6fd779eaf 100644
--- a/apps/web/src/app.js
+++ b/apps/web/src/app.js
@@ -166,7 +166,6 @@ function App() {
</Flex>
</Flex>
<StatusBar />
- <ThemeTransition />
</Flex>
</ThemeProvider>
</MotionConfig>
diff --git a/apps/web/src/components/theme-provider/themetransition.js b/apps/web/src/components/theme-provider/themetransition.js
deleted file mode 100644
index 46b9bd585..000000000
--- a/apps/web/src/components/theme-provider/themetransition.js
+++ /dev/null
@@ -1,50 +0,0 @@
-import React, { useEffect } from "react";
-import { useStore as useThemeStore } from "../../stores/theme-store";
-import Animated from "../animated";
-import { useAnimation } from "framer-motion";
-
-function ThemeTransition() {
- const theme = useThemeStore((store) => store.theme);
- const animate = useAnimation();
- useEffect(() => {
- if (!ThemeTransition.first) {
- ThemeTransition.first = true;
- return;
- }
- const element = document.getElementById("themeTransition");
- element.style.visibility = "visible";
- animate
- .start({
- opacity: 1,
- transition: { duration: 0 },
- })
- .then(() => {
- animate
- .start({
- opacity: 0,
- transition: { duration: 1.5 },
- })
- .then(() => {
- element.style.visibility = "collapse";
- });
- });
- }, [theme, animate]);
- return (
- <Animated.Box
- id="themeTransition"
- sx={{
- position: "absolute",
- width: "100%",
- height: "100%",
- top: 0,
- left: 0,
- zIndex: 999,
- opacity: 1,
- visibility: "collapse",
- }}
- animate={animate}
- bg="bgSecondary"
- />
- );
-}
-export default ThemeTransition;