mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
rename
This commit is contained in:
parent
d239b42a20
commit
84b919bb88
|
|
@ -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 = () => {
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue