2022-04-22 09:49:26 -04:00
|
|
|
import useFetchMock from '../hooks/use-fetch-mock'
|
|
|
|
import SettingsPageRoot from '../../js/features/settings/components/root'
|
|
|
|
import {
|
|
|
|
setDefaultMeta as setDefaultLeaveMeta,
|
|
|
|
defaultSetupMocks as defaultSetupLeaveMocks,
|
|
|
|
} from './helpers/leave'
|
|
|
|
import {
|
|
|
|
setDefaultMeta as setDefaultAccountInfoMeta,
|
|
|
|
defaultSetupMocks as defaultSetupAccountInfoMocks,
|
|
|
|
} from './helpers/account-info'
|
|
|
|
import {
|
|
|
|
setDefaultMeta as setDefaultPasswordMeta,
|
|
|
|
defaultSetupMocks as defaultSetupPasswordMocks,
|
|
|
|
} from './helpers/password'
|
|
|
|
import {
|
|
|
|
setDefaultMeta as setDefaultEmailsMeta,
|
|
|
|
defaultSetupMocks as defaultSetupEmailsMocks,
|
|
|
|
} from './helpers/emails'
|
|
|
|
import {
|
2022-04-25 07:04:44 -04:00
|
|
|
setDefaultMeta as setDefaultLinkingMeta,
|
|
|
|
defaultSetupMocks as defaultSetupLinkingMocks,
|
|
|
|
} from './helpers/linking'
|
2022-04-22 09:49:26 -04:00
|
|
|
import { UserProvider } from '../../js/shared/context/user-context'
|
|
|
|
|
|
|
|
export const Root = args => {
|
|
|
|
setDefaultLeaveMeta()
|
|
|
|
setDefaultAccountInfoMeta()
|
|
|
|
setDefaultPasswordMeta()
|
|
|
|
setDefaultEmailsMeta()
|
2022-04-25 07:04:44 -04:00
|
|
|
setDefaultLinkingMeta()
|
2022-04-22 09:49:26 -04:00
|
|
|
useFetchMock(defaultSetupLeaveMocks)
|
|
|
|
useFetchMock(defaultSetupAccountInfoMocks)
|
|
|
|
useFetchMock(defaultSetupPasswordMocks)
|
|
|
|
useFetchMock(defaultSetupEmailsMocks)
|
2022-04-25 07:04:44 -04:00
|
|
|
useFetchMock(defaultSetupLinkingMocks)
|
2022-04-22 09:49:26 -04:00
|
|
|
|
|
|
|
return (
|
|
|
|
<UserProvider>
|
|
|
|
<SettingsPageRoot {...args} />
|
|
|
|
</UserProvider>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
export default {
|
|
|
|
title: 'Account Settings / Full Page',
|
|
|
|
component: SettingsPageRoot,
|
|
|
|
}
|