always have shaderbackground in the bg

This commit is contained in:
code002lover 2025-12-09 13:55:12 +01:00
parent 7586133152
commit baa18484ca
2 changed files with 1 additions and 5 deletions

View File

@ -17,15 +17,12 @@ function App() {
localStorage.getItem("token") || ""
);
const [theme, setTheme] = useState<string>("default");
const [isShaderTheme, setIsShaderTheme] = useState(false);
useEffect(() => {
if (theme !== "default") {
document.body.classList.add("shader-theme");
setIsShaderTheme(true);
} else {
document.body.classList.remove("shader-theme");
setIsShaderTheme(false);
}
}, [theme]);
@ -88,7 +85,7 @@ function App() {
<option value="clouds">Clouds Theme</option>
</select>
</div>
{isShaderTheme && <ShaderBackground theme= {theme} />}
<ShaderBackground theme= {theme} />
<Routes>
<Route path="/" element={<PersonList people={people} />} />
<Route path="/games" element={<GameList />} />

View File

@ -154,7 +154,6 @@ export const ShaderBackground: React.FC<ShaderBackgroundProps> = ({
shader_code = CLOUDS_SHADER_CODE;
break;
default:
console.error("Unknown shader theme:", theme);
return;
}