This commit is contained in:
heheer 2025-12-24 17:25:13 +08:00
parent d239b42a20
commit 84b919bb88
No known key found for this signature in database
GPG Key ID: 37DCB43201661540
3 changed files with 5 additions and 5 deletions

View File

@ -18,7 +18,7 @@ import { useLocalStorageState } from 'ahooks';
import { useRouter } from 'next/router';
import { useUserStore } from '@/web/support/user/useUserStore';
const CLOSED_AD_KEY = 'hidden-activity-ad';
const CLOSED_AD_KEY = 'logout-activity-ad';
const CLOSED_AD_DURATION = 24 * 60 * 60 * 1000; // 24 hours
const ActivityAdModal = () => {

View File

@ -24,9 +24,9 @@ const TeamPlanStatusCard = () => {
loadOperationalAd();
}
if (operationalAd?.id) {
const currentKey = `hidden-operational-${operationalAd.id}`;
const currentKey = `logout-operational-${operationalAd.id}`;
Object.keys(localStorage).forEach((key) => {
if (key.startsWith('hidden-operational-') && key !== currentKey) {
if (key.startsWith('logout-operational-') && key !== currentKey) {
localStorage.removeItem(key);
}
});
@ -34,7 +34,7 @@ const TeamPlanStatusCard = () => {
}, [operationalAd, loadOperationalAd]);
const [hiddenUntil, setHiddenUntil] = useLocalStorageState<number | undefined>(
`hidden-operational-${operationalAd?.id}`,
`logout-operational-${operationalAd?.id}`,
{
defaultValue: undefined
}

View File

@ -3,7 +3,7 @@ import { loginOut } from '@/web/support/user/api';
const clearAdStorage = () => {
try {
Object.keys(localStorage).forEach((key) => {
if (key.startsWith('hidden-')) {
if (key.startsWith('logout-')) {
const oldValue = localStorage.getItem(key);
localStorage.removeItem(key);