overleaf/services/web/frontend/stories/settings/leavers-survey-alert.stories.tsx

26 lines
804 B
TypeScript
Raw Normal View History

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'
import { bsVersionDecorator } from '../../../.storybook/utils/with-bootstrap-switcher'
export const SurveyAlert = () => {
localStorage.setItem(
'showInstitutionalLeaversSurveyUntil',
Date.now() + 1000 * 60 * 60
)
return (
<UserEmailsProvider>
<LeaversSurveyAlert />
</UserEmailsProvider>
)
}
export default {
title: 'Account Settings / Survey Alerts',
component: EmailsSection,
argTypes: {
...bsVersionDecorator.argTypes,
},
}