Skip to content

Commit

Permalink
refactor(SettingsService): use standard instance name
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyckahn committed Jan 29, 2024
1 parent 1fa716f commit 4317826
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/pages/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import FormControlLabel from '@mui/material/FormControlLabel'
import Paper from '@mui/material/Paper'
import useTheme from '@mui/material/styles/useTheme'

import { settingsService } from 'services/Settings'
import { settings } from 'services/Settings'
import { notification } from 'services/Notification'
import { ShellContext } from 'contexts/ShellContext'
import { StorageContext } from 'contexts/StorageContext'
Expand Down Expand Up @@ -93,7 +93,7 @@ export const Settings = ({ userId }: SettingsProps) => {

const handleExportSettingsClick = async () => {
try {
await settingsService.exportSettings(getUserSettings())
await settings.exportSettings(getUserSettings())
} catch (e) {
if (isErrorWithMessage(e)) {
showAlert(e.message, { severity: 'error' })
Expand All @@ -103,7 +103,7 @@ export const Settings = ({ userId }: SettingsProps) => {

const handleImportSettingsClick = async ([[, file]]: Result[]) => {
try {
const userSettings = await settingsService.importSettings(file)
const userSettings = await settings.importSettings(file)

updateUserSettings(userSettings)

Expand Down
2 changes: 1 addition & 1 deletion src/services/Settings/Settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,4 +78,4 @@ export class SettingsService {
}
}

export const settingsService = new SettingsService()
export const settings = new SettingsService()

0 comments on commit 4317826

Please sign in to comment.