import { useState } from "react";
import { Download } from "lucide-react";
import { applyUpdate, installApp, useOnline, usePwa } from "../pwa/client";
import { Button } from "./design-system/primitives";
import { Modal } from "./design-system/Modal";
export function InstallApp() {
const { enabled, installed, installPrompt } = usePwa();
const [help, setHelp] = useState(false);
if (!enabled || installed) return null;
return <>
{help && iPhone or iPad: open the Share menu, then choose Add to Home Screen. Mac Safari: choose File → Add to Dock. Chrome or Edge: use the install icon in the address bar, or Install app in the browser menu. An internet connection is required to load and save habits.
This window will reload. Save any unfinished changes first.