diff --git a/js/app/components/settings/advanced-category-settings.tsx b/js/app/components/settings/advanced-category-settings.tsx index 608d68a30..453013baf 100644 --- a/js/app/components/settings/advanced-category-settings.tsx +++ b/js/app/components/settings/advanced-category-settings.tsx @@ -13,36 +13,12 @@ import { import { Check } from "lucide-react-native"; import { useEffect, useState } from "react"; import { useTranslation } from "react-i18next"; -import { Platform, ScrollView } from "react-native"; +import { ScrollView } from "react-native"; import { useStore } from "store"; import { DEFAULT_URL } from "store/slices/streamplaceSlice"; import { SettingToggle } from "./components/setting-toggle"; import { SettingsRowItem } from "./components/settings-navigation-item"; -const WEB_BETA_COOKIE = "sp_web_beta"; -const ONE_YEAR_SECONDS = 60 * 60 * 24 * 365; - -function isWebBetaEnabledCookie(): boolean { - if (typeof document === "undefined") return false; - const cookies = document.cookie.split(";"); - for (const raw of cookies) { - const [name, ...rest] = raw.trim().split("="); - if (name === WEB_BETA_COOKIE) { - return rest.join("=") === "1"; - } - } - return false; -} - -function setWebBetaCookie(enabled: boolean) { - if (typeof document === "undefined") return; - if (enabled) { - document.cookie = `${WEB_BETA_COOKIE}=1; path=/; max-age=${ONE_YEAR_SECONDS}; SameSite=Lax`; - } else { - document.cookie = `${WEB_BETA_COOKIE}=; path=/; max-age=0; SameSite=Lax`; - } -} - type Status = "ready" | "active" | "done"; export function AdvancedCategorySettings() { @@ -52,7 +28,6 @@ export function AdvancedCategorySettings() { const defaultUrl = DEFAULT_URL; const [newUrl, setNewUrl] = useState(""); const [overrideEnabled, setOverrideEnabled] = useState(false); - const [webBeta, setWebBeta] = useState(false); const { t } = useTranslation("settings"); const fetchBranding = useFetchBranding(); @@ -63,10 +38,6 @@ export function AdvancedCategorySettings() { setOverrideEnabled(url !== defaultUrl); }, [url, defaultUrl]); - useEffect(() => { - setWebBeta(isWebBetaEnabledCookie()); - }, []); - const onSubmitUrl = () => { if (newUrl) { let trimmedUrl = newUrl.endsWith("/") ? newUrl.slice(0, -1) : newUrl; @@ -82,17 +53,6 @@ export function AdvancedCategorySettings() { } }; - // Toggling web-beta writes a cookie and reloads. Web context only — - // the cookie lives in the browser, and the new web frontend is what - // we serve to opted-in users. Native mobile users have their own app - // and don't visit the web frontend. - const handleWebBetaToggle = (enabled: boolean) => { - setWebBetaCookie(enabled); - if (typeof window !== "undefined") { - window.location.reload(); - } - }; - return ( @@ -107,17 +67,6 @@ export function AdvancedCategorySettings() { /> - {Platform.OS === "web" && ( - - - - )} - {overrideEnabled && (