"use client"; import { PropsWithChildren, useState } from "react"; import { motion, AnimatePresence } from "framer-motion"; import { useDeveloperFlags } from "@/components/developer-flags-provider"; export function HiddenEasterEggTrigger({ children }: PropsWithChildren) { const [clickCount, setClickCount] = useState(0); const [show, setShow] = useState(false); const { flags, setFlag } = useDeveloperFlags(); return ( <> { const next = clickCount + 1; setClickCount(next); if (next >= 10) { setShow(true); setClickCount(0); } }} > {children} {show && ( setShow(false)} > 开发者控制台 仅开发者可见的开关,不对普通用户展示。 运营弹层 setFlag("opsPopup", e.target.checked)} /> A/B Banner setFlag("abBanner", e.target.checked)} /> 事件调试面板 setFlag("eventDebug", e.target.checked)} /> )} > ); }
开发者控制台
仅开发者可见的开关,不对普通用户展示。