diff --git a/src/hooks/usePOTASpots.js b/src/hooks/usePOTASpots.js index d92494cd..fa5385e9 100644 --- a/src/hooks/usePOTASpots.js +++ b/src/hooks/usePOTASpots.js @@ -72,8 +72,7 @@ export const usePOTASpots = () => { const validSpots = spots .filter((s) => { // Filter out QRT (operator signed off) - const comments = (s.comments || '').toUpperCase().trim(); - if (comments === 'QRT' || comments.startsWith('QRT ') || comments.startsWith('QRT,')) return false; + if (/\bQRT\b/.test((s.comments || '').toUpperCase().trim())) return false; // Filter out spots expiring within 60 seconds if (typeof s.expire === 'number' && s.expire < 60) return false; diff --git a/src/hooks/useSOTASpots.js b/src/hooks/useSOTASpots.js index 90eafa89..0333971c 100644 --- a/src/hooks/useSOTASpots.js +++ b/src/hooks/useSOTASpots.js @@ -47,8 +47,7 @@ export const useSOTASpots = () => { .filter((s) => { if (!(s.activatorCallsign && s.frequency)) return false; // Filter out QRT (operator signed off) - const comments = (s.comments || '').toUpperCase().trim(); - if (comments === 'QRT' || comments.startsWith('QRT ') || comments.startsWith('QRT,')) return false; + if (/\bQRT\b/.test((s.comments || '').toUpperCase().trim())) return false; // Filter out spots older than 60 minutes if (s.timeStamp) { const ts = s.timeStamp.endsWith('Z') || s.timeStamp.endsWith('z') ? s.timeStamp : s.timeStamp + 'Z'; diff --git a/src/hooks/useWWFFSpots.js b/src/hooks/useWWFFSpots.js index c71b6019..8783cbfc 100644 --- a/src/hooks/useWWFFSpots.js +++ b/src/hooks/useWWFFSpots.js @@ -44,9 +44,7 @@ export const useWWFFSpots = () => { const validSpots = spots .filter((s) => { // Filter out QRT (operator signed off) - const comments = (s.remarks || '').toUpperCase().trim(); - if (comments === 'QRT' || comments.startsWith('QRT ') || comments.startsWith('QRT,')) return false; - + if (/\bQRT\b/.test((s.remarks || '').toUpperCase().trim())) return false; // We should also time it out if it's more than 60 minutes old if (Math.floor(Date.now() / 1000) - s.spot_time > 3600) return false;