import React, { useState } from 'react'; export function PWAInstallGuide() { const [showGuide, setShowGuide] = useState(false); const getInstallInstructions = () => { const userAgent = navigator.userAgent; if (/android/i.test(userAgent)) { return { os: 'Android', steps: [ 'Look for the "Install" popup at the bottom of the screen', 'Tap "Install" to add SSC to your home screen', 'Or, tap the menu icon (three dots) → "Install app"', 'The app will appear as a standalone app on your home screen' ] }; } else if (/iphone|ipad|ipod/.test(userAgent)) { return { os: 'iOS', steps: [ 'Tap the Share button (square with arrow)', 'Scroll down and tap "Add to Home Screen"', 'Enter the app name (or leave as "SSC")', 'Tap "Add" to confirm', 'The app will appear on your home screen' ] }; } else { return { os: 'Desktop/Web', steps: [ 'Look for the install icon in the address bar (usually on the right)', 'Click the icon to install the app', 'Or, use the browser menu → "Install SSC"', 'The app can be launched from your applications menu' ] }; } }; const instructions = getInstallInstructions(); return ( <> {showGuide && (
Platform: {instructions.os}