import { useState, useEffect, useRef } from 'react'; import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription } from '@/components/ui/dialog'; import { Button } from '@/components/ui/button'; import { APP_VERSION, RELEASE_NOTES } from '@/lib/version'; import { Sparkles } from 'lucide-react'; const STORAGE_KEY = `bt-release-seen-${APP_VERSION}`; export function ReleaseNotesDialog() { const [open, setOpen] = useState(false); const titleRef = useRef(null); useEffect(() => { const seen = localStorage.getItem(STORAGE_KEY); if (!seen) setOpen(true); }, []); const handleClose = () => { localStorage.setItem(STORAGE_KEY, 'true'); setOpen(false); // Return focus to where it was before the dialog opened const previouslyFocused = document.activeElement; if (previouslyFocused && typeof previouslyFocused.focus === 'function') { setTimeout(() => previouslyFocused.focus(), 0); } }; return ( { if (!o) handleClose(); }}>
What's new in v{RELEASE_NOTES.version}
Bill Tracker is brand new Release notes and new features overview
{RELEASE_NOTES.highlights.map((item, i) => (

{item.title}

{item.desc}

))}
Access original UI
); }