overleaf/services/web/frontend/js/features/source-editor/utils/switch-away-survey.ts

12 lines
320 B
TypeScript
Raw Normal View History

import localStorage from '../../../infrastructure/local-storage'
const surveyOneKey = 'editor.has_seen_cm6_switch_away_survey'
export function setHasSeenCM6SwitchAwaySurvey() {
localStorage.setItem(surveyOneKey, true)
}
export function hasSeenCM6SwitchAwaySurvey() {
return !!localStorage.getItem(surveyOneKey)
}