(data: UserSettingsApi)
| 44 | * Shared by both client fetch and server prefetch to prevent shape drift. |
| 45 | */ |
| 46 | export function mapGeneralSettingsResponse(data: UserSettingsApi): GeneralSettings { |
| 47 | return { |
| 48 | autoConnect: data.autoConnect, |
| 49 | showTrainingControls: data.showTrainingControls, |
| 50 | superUserModeEnabled: data.superUserModeEnabled, |
| 51 | mothershipEnvironment: data.mothershipEnvironment, |
| 52 | theme: data.theme, |
| 53 | telemetryEnabled: data.telemetryEnabled, |
| 54 | billingUsageNotificationsEnabled: data.billingUsageNotificationsEnabled, |
| 55 | errorNotificationsEnabled: data.errorNotificationsEnabled, |
| 56 | snapToGridSize: data.snapToGridSize, |
| 57 | showActionBar: data.showActionBar, |
| 58 | timezone: data.timezone ?? null, |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Fetch general settings from API |
no outgoing calls
no test coverage detected