From 192f004bc72525a035cfa86e5a195978a1dd0130 Mon Sep 17 00:00:00 2001
From: Producdevity <y.gherbi.dev@gmail.com>
Date: Thu, 4 Jun 2026 16:35:21 +0200
Subject: [PATCH 1/2] chore: remove unused Stop Killing Games popup

---
 .../popups/StopKillingGamesPopup.tsx          | 122 ------------------
 src/data/storageKeys.ts                       |   1 -
 src/lib/analytics/actions.ts                  |   2 -
 src/lib/analytics/analytics.ts                |  18 ---
 4 files changed, 143 deletions(-)
 delete mode 100644 src/components/popups/StopKillingGamesPopup.tsx

diff --git a/src/components/popups/StopKillingGamesPopup.tsx b/src/components/popups/StopKillingGamesPopup.tsx
deleted file mode 100644
index 176f871f6..000000000
--- a/src/components/popups/StopKillingGamesPopup.tsx
+++ /dev/null
@@ -1,122 +0,0 @@
-'use client'
-
-import { AlertTriangle, X } from 'lucide-react'
-import { useState, useEffect, useRef } from 'react'
-import { Modal } from '@/components/ui'
-import storageKeys from '@/data/storageKeys'
-import analytics from '@/lib/analytics'
-import { env } from '@/lib/env'
-
-const signPetitionUrl = 'https://eci.ec.europa.eu/045/public/#/screen/home'
-
-// TODO: check if we still need this for something
-export function StopKillingGamesPopup() {
-  const [isOpen, setIsOpen] = useState(false)
-
-  // Track the time when component mounts
-  const startTimeRef = useRef<number>(Date.now())
-
-  // Function to get actual time spent on page in seconds
-  const getTimeOnPage = (): number => {
-    return Math.round((Date.now() - startTimeRef.current) / 1000)
-  }
-
-  useEffect(() => {
-    if (!env.IS_PUBLIC_PRODUCTION) return
-
-    // Don't show on admin pages
-    if (window.location.pathname.startsWith('/admin')) return
-
-    const hasBeenDismissed = localStorage.getItem(storageKeys.popups.stopKillingGamesDismissed)
-
-    if (hasBeenDismissed) return
-
-    // Show popup after 20 seconds
-    const timer = setTimeout(() => {
-      setIsOpen(true)
-    }, 20000)
-
-    return () => clearTimeout(timer)
-  }, [])
-
-  function handleDismiss() {
-    analytics.engagement.stopKillingGamesDismissed({
-      timeOnPage: getTimeOnPage(),
-    })
-    localStorage.setItem(storageKeys.popups.stopKillingGamesDismissed, 'true')
-    setIsOpen(false)
-  }
-
-  const handleClick = () => {
-    setIsOpen(false)
-    analytics.engagement.stopKillingGamesCTA({ timeOnPage: getTimeOnPage() })
-    window.open(signPetitionUrl, '_blank', 'noopener,noreferrer')
-  }
-
-  if (!env.IS_PUBLIC_PRODUCTION || !isOpen) return null
-
-  return (
-    <Modal isOpen={isOpen} onClose={handleDismiss} hideCloseButton={true} className="max-w-lg">
-      <div className="p-6">
-        <div className="flex items-start gap-4">
-          <div className="flex-shrink-0">
-            <AlertTriangle className="h-8 w-8 text-amber-500" />
-          </div>
-
-          <div className="flex-1">
-            <h2 className="text-xl font-semibold text-gray-900 dark:text-gray-100 mb-3">
-              The Community needs your help to <strong>&#34;Stop Killing Games&#34;</strong>
-            </h2>
-
-            <div className="text-gray-600 dark:text-gray-300 space-y-3 mb-6">
-              <p>
-                765,634 people have already signed a petition urging publishers to make future games
-                playable even after servers shut down.
-              </p>
-              <p>
-                It calls for offline modes or private server support—to preserve ownership and
-                access.
-              </p>
-              <p>Once 1 million signatures are reached, the EU Commission must review it.</p>
-              <p>
-                <strong className="text-gray-800 dark:text-gray-200">
-                  Care to help to hit the mark?
-                </strong>
-              </p>
-              <p>
-                <a
-                  href="https://www.stopkillinggames.com/"
-                  target="_blank"
-                  rel="noopener noreferrer"
-                  className="underline text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors"
-                >
-                  Learn more
-                </a>
-              </p>
-            </div>
-
-            <div className="flex justify-end gap-2">
-              <button
-                onClick={handleDismiss}
-                className="inline-flex items-center gap-2 px-4 py-2 bg-gray-300 dark:bg-gray-700 hover:bg-gray-400 dark:hover:bg-gray-600 text-black dark:text-white rounded-lg font-medium transition-colors"
-              >
-                Dismiss
-                <X className="h-4 w-4" />
-              </button>
-
-              <a
-                href={signPetitionUrl}
-                target="_blank"
-                rel="noopener noreferrer"
-                onClick={handleClick}
-                className="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors"
-              >
-                Sign the Petition
-              </a>
-            </div>
-          </div>
-        </div>
-      </div>
-    </Modal>
-  )
-}
diff --git a/src/data/storageKeys.ts b/src/data/storageKeys.ts
index ccc5ee701..3dc7325eb 100644
--- a/src/data/storageKeys.ts
+++ b/src/data/storageKeys.ts
@@ -9,7 +9,6 @@ const storageKeys = {
     lastUsedDevice: `${PREFIX}new_listing_last_used_device`,
   },
   popups: {
-    stopKillingGamesDismissed: `${PREFIX}stop_killing_games_dismissed`,
     voteReminderDismissed: `${PREFIX}vote_reminder_dismissed`,
     betaWarningDismissed: `${PREFIX}beta_warning_dismissed_v2`,
     supportBannerDismissed: `${PREFIX}support_banner_dismissed`,
diff --git a/src/lib/analytics/actions.ts b/src/lib/analytics/actions.ts
index 2f1a74870..c13337fa1 100644
--- a/src/lib/analytics/actions.ts
+++ b/src/lib/analytics/actions.ts
@@ -51,12 +51,10 @@ export const ENGAGEMENT_ACTIONS = {
   COMMENT_VOTE_UP: 'comment_vote_up',
   GAME_VIEW: 'game_view',
   LISTING_VIEW: 'listing_view',
-  STOP_KILLING_GAMES_CTA: 'stop_killing_games_cta',
   USER_PROFILE_VIEW: 'user_profile_view',
   VOTE_DOWN: 'vote_down',
   VOTE_REMINDER_CLICKED: 'vote_reminder_clicked',
   VOTE_REMINDER_DISMISSED: 'vote_reminder_dismissed',
-  STOP_KILLING_GAMES_DISMISSED: 'stop_killing_games_dismissed',
   SUPPORT_BANNER_SHOWN: 'support_banner_shown',
   SUPPORT_BANNER_DISMISSED: 'support_banner_dismissed',
   SUPPORT_BANNER_CTA: 'support_banner_cta',
diff --git a/src/lib/analytics/analytics.ts b/src/lib/analytics/analytics.ts
index 79482c3b1..9c44e30ff 100644
--- a/src/lib/analytics/analytics.ts
+++ b/src/lib/analytics/analytics.ts
@@ -385,24 +385,6 @@ const analytics = {
       })
     },
 
-    stopKillingGamesDismissed: (params: { timeOnPage: number }) => {
-      sendAnalyticsEvent({
-        category: ANALYTICS_CATEGORIES.ENGAGEMENT,
-        action: ENGAGEMENT_ACTIONS.STOP_KILLING_GAMES_DISMISSED,
-        entityType: 'popup',
-        metadata: { timeOnPage: params.timeOnPage },
-      })
-    },
-
-    stopKillingGamesCTA: (params: { timeOnPage: number }) => {
-      sendAnalyticsEvent({
-        category: ANALYTICS_CATEGORIES.ENGAGEMENT,
-        action: ENGAGEMENT_ACTIONS.STOP_KILLING_GAMES_CTA,
-        entityType: 'popup',
-        metadata: { timeOnPage: params.timeOnPage },
-      })
-    },
-
     supportBannerShown: (params: { variant: string; page: string }) => {
       sendAnalyticsEvent({
         category: ANALYTICS_CATEGORIES.ENGAGEMENT,

From a2c508abe0ea93d26693c9f84ae8a3876acfa66b Mon Sep 17 00:00:00 2001
From: Producdevity <y.gherbi.dev@gmail.com>
Date: Thu, 4 Jun 2026 16:54:00 +0200
Subject: [PATCH 2/2] chore: remove unused beta warning popup

---
 src/components/popups/BetaWarningPopup.tsx | 112 ---------------------
 src/components/popups/index.ts             |   1 -
 src/data/storageKeys.ts                    |   1 -
 3 files changed, 114 deletions(-)
 delete mode 100644 src/components/popups/BetaWarningPopup.tsx
 delete mode 100644 src/components/popups/index.ts

diff --git a/src/components/popups/BetaWarningPopup.tsx b/src/components/popups/BetaWarningPopup.tsx
deleted file mode 100644
index 8b1721d84..000000000
--- a/src/components/popups/BetaWarningPopup.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-'use client'
-
-import { AlertTriangle, X } from 'lucide-react'
-import { useState, useEffect } from 'react'
-import { Modal } from '@/components/ui'
-import storageKeys from '@/data/storageKeys'
-import { env } from '@/lib/env'
-
-const discordUrl = process.env.NEXT_PUBLIC_DISCORD_LINK
-
-export function BetaWarningPopup() {
-  const [isOpen, setIsOpen] = useState(false)
-
-  useEffect(() => {
-    if (!env.IS_PUBLIC_PRODUCTION) return
-
-    // Don't show on admin pages
-    if (window.location.pathname.startsWith('/admin')) return
-
-    const hasBeenDismissed = localStorage.getItem(storageKeys.popups.betaWarningDismissed)
-
-    if (hasBeenDismissed) return
-
-    // Small delay to ensure page has loaded
-    const timer = setTimeout(() => {
-      setIsOpen(true)
-    }, 1000)
-
-    return () => clearTimeout(timer)
-  }, [])
-
-  function handleDismiss() {
-    localStorage.setItem(storageKeys.popups.betaWarningDismissed, 'true')
-    setIsOpen(false)
-  }
-
-  if (!env.IS_PUBLIC_PRODUCTION || !isOpen) return null
-
-  return (
-    <Modal isOpen={isOpen} onClose={handleDismiss} hideCloseButton={true} className="max-w-lg">
-      <div className="p-6">
-        <div className="flex items-start gap-4">
-          <div className="flex-shrink-0">
-            <AlertTriangle className="h-8 w-8 text-amber-500" />
-          </div>
-
-          <div className="flex-1">
-            <h2 className="text-xl font-semibold text-gray-900 dark:text-gray-100 mb-3">
-              Welcome to EmuReady Beta!
-            </h2>
-
-            <div className="text-gray-600 dark:text-gray-300 space-y-3 mb-6">
-              <p>
-                Thanks for checking out EmuReady! We&apos;re excited to have you here, but please
-                note that
-                <strong className="text-gray-800 dark:text-gray-200">
-                  {' '}
-                  we&apos;re still in beta testing
-                </strong>
-                .
-              </p>
-
-              <p>What this means:</p>
-
-              <ul className="list-disc list-inside space-y-1 ml-4">
-                <li>You may encounter bugs or unexpected behavior</li>
-                <li>Features may change or be temporarily unavailable</li>
-              </ul>
-
-              <p className="mt-2">
-                If you find any issues, please report them on our{' '}
-                <a
-                  href={discordUrl}
-                  target="_blank"
-                  rel="noopener noreferrer"
-                  aria-label="Discord Community"
-                  className="underline text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors"
-                >
-                  Discord
-                </a>{' '}
-                or{' '}
-                <a
-                  href="https://github.com/Producdevity/EmuReady"
-                  target="_blank"
-                  rel="noopener noreferrer"
-                  aria-label="EmuReady GitHub"
-                  className="underline text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 transition-colors"
-                >
-                  GitHub
-                </a>
-                .
-                <span className="mt-2">
-                  Feel free to explore, create an account, and get familiar with the platform.
-                </span>
-              </p>
-            </div>
-
-            <div className="flex justify-end">
-              <button
-                onClick={handleDismiss}
-                className="inline-flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg font-medium transition-colors"
-              >
-                I understand
-                <X className="h-4 w-4" />
-              </button>
-            </div>
-          </div>
-        </div>
-      </div>
-    </Modal>
-  )
-}
diff --git a/src/components/popups/index.ts b/src/components/popups/index.ts
deleted file mode 100644
index 427f0f8f5..000000000
--- a/src/components/popups/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export * from './BetaWarningPopup'
diff --git a/src/data/storageKeys.ts b/src/data/storageKeys.ts
index 3dc7325eb..cd980e2c7 100644
--- a/src/data/storageKeys.ts
+++ b/src/data/storageKeys.ts
@@ -10,7 +10,6 @@ const storageKeys = {
   },
   popups: {
     voteReminderDismissed: `${PREFIX}vote_reminder_dismissed`,
-    betaWarningDismissed: `${PREFIX}beta_warning_dismissed_v2`,
     supportBannerDismissed: `${PREFIX}support_banner_dismissed`,
   },
   cookies: {
