sozsoft-platform/ui/src/views/version/mountAppUpdateDialog.tsx
2026-08-13 00:52:49 +03:00

19 lines
681 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import { createRoot, type Root } from 'react-dom/client'
import AppUpdateDialog from './AppUpdateDialog'
/**
* Güncelleme penceresi uygulama ağacından bağımsız, kendi kökünde mount edilir:
* - Entry chunk'ta taşınmaz (yalnızca güncelleme varken indirilir).
* - Router/Store yeniden render'larından etkilenmez, güncelleme sırasında
* uygulama yeniden yüklense bile pencere ayakta kalır.
*/
let root: Root | undefined
export const mountAppUpdateDialog = () => {
if (root) return
const host = document.createElement('div')
host.id = 'app-update-root'
document.body.appendChild(host)
root = createRoot(host)
root.render(<AppUpdateDialog />)
}