overleaf/services/web/frontend/js/features/source-editor/utils/switch-away-survey.ts
Tim Down 08567c290e Add second CM6 switch-away survey (#10789)
Restart CM6 switch-away survey

GitOrigin-RevId: 1d62aaf27834cb3919f6ca30c269a1ef3c2e9a5e
2022-12-07 09:04:35 +00:00

11 lines
320 B
TypeScript

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)
}