mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-02-24 12:24:46 +08:00
feat: delete NEXT_PUBLIC_ENABLE_BLOCKAD
This commit is contained in:
@@ -123,13 +123,13 @@ function PlayPageClient() {
|
||||
// 上次使用的音量,默认 0.7
|
||||
const lastVolumeRef = useRef<number>(0.7);
|
||||
|
||||
// 新增:去广告开关(从 localStorage 继承,默认取环境变量)
|
||||
// 新增:去广告开关(从 localStorage 继承,默认 true)
|
||||
const [blockAdEnabled, _setBlockAdEnabled] = useState<boolean>(() => {
|
||||
if (typeof window !== 'undefined') {
|
||||
const v = localStorage.getItem('enable_blockad');
|
||||
if (v !== null) return v === 'true';
|
||||
}
|
||||
return process.env.NEXT_PUBLIC_ENABLE_BLOCKAD === 'true';
|
||||
return true;
|
||||
});
|
||||
|
||||
// 同步最新值到 refs
|
||||
|
||||
Reference in New Issue
Block a user