diff --git a/src/App.tsx b/src/App.tsx
index 7738fc9..36a79a3 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -69,6 +69,7 @@ function App() {
setLoaded(true);
} else {
handleThemeChange(allThemes, false);
+ setLoaded(true);
}
} else if (currentThemePlaylist === 'Time of Day') {
const themeList = JSON.parse(
@@ -93,8 +94,13 @@ function App() {
handleThemeChange(filteredThemes, false);
}
}
- }, [isAllThemesFetched, themeName, currentThemePlaylist, isThemePlaylistsFetched]);
-
+ }, [
+ isAllThemesFetched,
+ themeName,
+ allThemes,
+ currentThemePlaylist,
+ isThemePlaylistsFetched,
+ ]);
return (
<>
{theme && (
diff --git a/src/components/Loading.tsx b/src/components/Loading.tsx
index 5843957..1315b2b 100644
--- a/src/components/Loading.tsx
+++ b/src/components/Loading.tsx
@@ -1,4 +1,4 @@
-import { Center, Loader, Stack } from '@mantine/core';
+import { Stack } from '@mantine/core';
import { stackClasses } from 'styles';
function Loading({ loaded }: any) {
@@ -10,11 +10,7 @@ function Loading({ loaded }: any) {
className={stackClasses.fadeAway}
classNames={stackClasses}
data-loaded={loaded}
- >
-
-
-
-
+ />
);
}
diff --git a/src/components/MainLayout.tsx b/src/components/MainLayout.tsx
index ddaf29d..7e45b7f 100644
--- a/src/components/MainLayout.tsx
+++ b/src/components/MainLayout.tsx
@@ -1,23 +1,10 @@
import { Box } from '@mantine/core';
-import { useCommonHooks } from 'hooks';
import { Outlet } from 'react-router-dom';
+import { boxClasses } from 'styles';
export function MainLayout() {
- const { theme } = useCommonHooks();
return (
-
+
);
diff --git a/src/components/ThemeProvider.tsx b/src/components/ThemeProvider.tsx
index febe83d..97a1e67 100644
--- a/src/components/ThemeProvider.tsx
+++ b/src/components/ThemeProvider.tsx
@@ -12,6 +12,7 @@ export function ThemeProvider({
'--color-background': theme.backgroundColor,
'--color-border': theme.borderColor,
'--color-search-background': theme.searchColor,
+ '--image-background': `linear-gradient(${theme.backgroundColor}33, ${theme.backgroundColor}33), url(/backgrounds/${theme.backgroundImage})`,
'--toastify-color-light': `hwb(from ${theme.primaryColor} h w b / 0.25)`,
'--toastify-color-dark': `hwb(from ${theme.primaryColor} h w b / 0.25)`,
'--toastify-color-info': '#3498db',
diff --git a/src/styles/Box.module.css b/src/styles/Box.module.css
index b175d75..8585b44 100644
--- a/src/styles/Box.module.css
+++ b/src/styles/Box.module.css
@@ -1,3 +1,16 @@
+.layoutContainer {
+ width: 100%;
+ height: 100%;
+ position: fixed;
+ background-image: var(--image-background);
+ background-size: cover;
+ background-repeat: no-repeat;
+ background-position: center;
+ z-index: -1;
+ overflow: scroll;
+ transition: background-image .3s ease;
+}
+
.appItemBox {
display: flex;
flex-direction: row;
diff --git a/src/styles/Stack.module.css b/src/styles/Stack.module.css
index 873494f..29bc98f 100644
--- a/src/styles/Stack.module.css
+++ b/src/styles/Stack.module.css
@@ -61,9 +61,11 @@
width: 100%;
opacity: 1;
display: flex;
+ z-index: 100;
backdrop-filter: blur(5px);
&[data-loaded="true"] {
opacity: 0;
+ background-color: var(--color-background);
z-index: -1;
}
}