overleaf/services/web/frontend/stories/settings/leavers-survey-alert.stories.tsx
Timothée Alby 3580ec6db3 Merge pull request #8029 from overleaf/ta-settings-fix-7
[SettingsPage] Small Fixes 7

GitOrigin-RevId: 2716fe13af3f5f6b56d6bba47505fad75ba1adbf
2022-05-24 08:04:47 +00:00

21 lines
662 B
TypeScript

import EmailsSection from '../../js/features/settings/components/emails-section'
import { UserEmailsProvider } from '../../js/features/settings/context/user-email-context'
import { LeaversSurveyAlert } from '../../js/features/settings/components/leavers-survey-alert'
import localStorage from '../../js/infrastructure/local-storage'
export const SurveyAlert = () => {
localStorage.setItem(
'showInstitutionalLeaversSurveyUntil',
Date.now() + 1000 * 60 * 60
)
return (
<UserEmailsProvider>
<LeaversSurveyAlert />
</UserEmailsProvider>
)
}
export default {
title: 'Account Settings / Survey Alerts',
component: EmailsSection,
}