Download mobile/src/effects/MtkUpdateAlert.tsx from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 1.04 kB
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/effects/MtkUpdateAlert.tsx
- Command line
-
hf download hf://Anirudh1950/MentraOS/mobile/src/effects/MtkUpdateAlert.tsx
-
curl -L -o MtkUpdateAlert.tsx https://huggingface.co/Anirudh1950/MentraOS/resolve/main/mobile/src/effects/MtkUpdateAlert.tsx
1.04 kB
| import {useEffect} from "react" | |
| import GlobalEventEmitter from "@/utils/GlobalEventEmitter" | |
| /** | |
| * Effect that listens for MTK firmware update completion. | |
| * | |
| * Note: The OTA progress screen now handles the mtk_update_complete event | |
| * and transitions from "installing" to "completed" state. | |
| * This effect is kept for logging purposes but no longer shows an alert | |
| * to avoid duplicate notifications when the OTA screen is active. | |
| */ | |
| export function MtkUpdateAlert() { | |
| useEffect(() => { | |
| const handleMtkUpdateComplete = (data: {message: string; timestamp: number}) => { | |
| console.log("MTK firmware update complete:", data.message) | |
| // Alert removed - OTA progress screen handles the UI transition | |
| } | |
| // Subscribe to MTK update complete events | |
| GlobalEventEmitter.on("mtk_update_complete", handleMtkUpdateComplete) | |
| // Cleanup subscription on unmount | |
| return () => { | |
| GlobalEventEmitter.off("mtk_update_complete", handleMtkUpdateComplete) | |
| } | |
| }, []) | |
| return null | |
| } | |