mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
146a207fd1
[SettingsPage] Refactor Linking Section GitOrigin-RevId: 49aa27cdcb3669c59c9a9c46edd3249cee876dd0
47 lines
1.4 KiB
JavaScript
47 lines
1.4 KiB
JavaScript
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 {
|
|
setDefaultMeta as setDefaultLinkingMeta,
|
|
defaultSetupMocks as defaultSetupLinkingMocks,
|
|
} from './helpers/linking'
|
|
import { UserProvider } from '../../js/shared/context/user-context'
|
|
|
|
export const Root = args => {
|
|
setDefaultLeaveMeta()
|
|
setDefaultAccountInfoMeta()
|
|
setDefaultPasswordMeta()
|
|
setDefaultEmailsMeta()
|
|
setDefaultLinkingMeta()
|
|
useFetchMock(defaultSetupLeaveMocks)
|
|
useFetchMock(defaultSetupAccountInfoMocks)
|
|
useFetchMock(defaultSetupPasswordMocks)
|
|
useFetchMock(defaultSetupEmailsMocks)
|
|
useFetchMock(defaultSetupLinkingMocks)
|
|
|
|
return (
|
|
<UserProvider>
|
|
<SettingsPageRoot {...args} />
|
|
</UserProvider>
|
|
)
|
|
}
|
|
|
|
export default {
|
|
title: 'Account Settings / Full Page',
|
|
component: SettingsPageRoot,
|
|
}
|