Fixed a bug in the Navigation.jsx

This commit is contained in:
2023-07-08 21:26:23 +02:00
parent e37c53d4c9
commit 73cbde7305

View File

@ -20,13 +20,10 @@ export const Navigation = () => {
const openDashboard = () => { const openDashboard = () => {
setDashboardLoading(true); setDashboardLoading(true);
setTimeout(() => location.href = "https://dash.licenseapi.de", 500); const timeout = setTimeout(() => window.location.replace("https://dash.licenseapi.de"), 500);
return () => clearTimeout(timeout);
} }
useEffect(() => {
setDashboardLoading(false);
}, []);
return ( return (
<AppBar position="fixed" sx={{height: NAVBAR_HEIGHT, boxShadow: "none", justifyContent: "center", <AppBar position="fixed" sx={{height: NAVBAR_HEIGHT, boxShadow: "none", justifyContent: "center",
backgroundColor: isDarkMode ? "rgba(0, 0, 0, 0.5)" : "rgba(255, 255, 255, 0.5)", backgroundColor: isDarkMode ? "rgba(0, 0, 0, 0.5)" : "rgba(255, 255, 255, 0.5)",