Fix PWA-Update: window global statt dynamic import, synchroner Reload bei Seitenwechsel
This commit is contained in:
@@ -2383,7 +2383,10 @@ export default function App() {
|
||||
const [user,setUser]=useState(null);
|
||||
const [active,setActiveRaw]=useState('dashboard');
|
||||
const setActive = (page) => {
|
||||
import('./main.jsx').then(m => m.reloadIfNewBuild?.()).catch(()=>{});
|
||||
if (window.__newBuildAvailable) {
|
||||
window.location.reload();
|
||||
return; // kein Rendern mehr, Reload läuft
|
||||
}
|
||||
setActiveRaw(page);
|
||||
};
|
||||
const [toastMsg,setToastMsg]=useState({msg:'',type:'success'});
|
||||
|
||||
Reference in New Issue
Block a user