react-code-dataset / wp-calypso /client /landing /subscriptions /components /tab-views /settings /settings.tsx
react-code-dataset / wp-calypso /client /landing /subscriptions /components /tab-views /settings /settings.tsx
Download wp-calypso/client/landing/subscriptions/components/tab-views/settings/settings.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 672 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/subscriptions/components/tab-views/settings/settings.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/landing/subscriptions/components/tab-views/settings/settings.tsx
-
curl -L -o settings.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/landing/subscriptions/components/tab-views/settings/settings.tsx
672 Bytes
| import { SubscriptionManager } from '@automattic/data-stores'; | |
| import { UserSettings } from 'calypso/landing/subscriptions/components/user-settings'; | |
| import TabView from '../tab-view'; | |
| const Settings = () => { | |
| const { | |
| data: settings, | |
| isInitialLoading, | |
| isLoading, | |
| error, | |
| } = SubscriptionManager.useUserSettingsQuery(); | |
| // todo: translate when we have agreed on the error message | |
| const errorMessage = error ? 'An error occurred while fetching your subscription settings.' : ''; | |
| return ( | |
| <TabView errorMessage={ errorMessage } isLoading={ isInitialLoading || isLoading }> | |
| <UserSettings value={ settings } /> | |
| </TabView> | |
| ); | |
| }; | |
| export default Settings; | |