fix: service worker network-first strategy + lint fixes

This commit is contained in:
N1C4T
2026-01-10 19:50:59 +04:00
parent 1a55696407
commit a5e82fffa6
21 changed files with 136 additions and 240 deletions

View File

@@ -12,7 +12,11 @@ interface AurFloatingCardProps {
setSelectedHelper: (helper: 'yay' | 'paru') => void;
}
// Floating cards that ask Arch users about their AUR helper (yay vs paru drama)
/**
* Floating card wizard for Arch users with AUR packages.
* Asks whether they have an AUR helper, then which one.
* The yay vs paru debate is the real holy war of our time.
*/
export function AurFloatingCard({
show,
aurAppNames,
@@ -27,7 +31,7 @@ export function AurFloatingCard({
const [hasAnswered, setHasAnswered] = useState<boolean | null>(null);
// Track if user has selected a helper (completed flow)
const [helperChosen, setHelperChosen] = useState(false);
// Track if user has interacted (dismissed or selected) to prevent nagging - use ref to persist
// Tracks if user has answered - use ref to survive re-renders
const userInteractedRef = useRef(false);
// Reset when new AUR packages appear, BUT ONLY if user hasn't interacted yet