mirror of
https://github.com/modrinth/code.git
synced 2026-08-30 11:36:05 +00:00
fix: error page
This commit is contained in:
@@ -33,7 +33,7 @@ import {
|
||||
import { useAuth } from './composables/auth'
|
||||
|
||||
const auth = await useAuth()
|
||||
const userPreferences = setupProviders(auth)
|
||||
const { userPreferences } = setupProviders(auth)
|
||||
const cosmetics = useCosmetics()
|
||||
const theme = useTheme()
|
||||
const { locale, setLocale } = injectI18n()
|
||||
|
||||
@@ -110,7 +110,6 @@ import {
|
||||
commonMessages,
|
||||
defineMessage,
|
||||
defineMessages,
|
||||
injectNotificationManager,
|
||||
IntlFormatted,
|
||||
LoadingBar,
|
||||
normalizeChildren,
|
||||
@@ -131,10 +130,9 @@ import { getSignInRouteObj } from '~/composables/auth.js'
|
||||
import { setupProviders } from '~/providers/setup.ts'
|
||||
|
||||
const auth = await useAuth()
|
||||
setupProviders(auth)
|
||||
const { notificationManager } = setupProviders(auth)
|
||||
|
||||
const { formatMessage } = useVIntl()
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const isSwitchingAccount = useIsSwitchingAccount()
|
||||
|
||||
const props = defineProps({
|
||||
@@ -180,7 +178,7 @@ async function signOut() {
|
||||
async function onSelectStoredAccount(account) {
|
||||
const result = await switchToStoredAccount(account)
|
||||
if (result === 'error') {
|
||||
addNotification({
|
||||
notificationManager.addNotification({
|
||||
title: formatMessage(commonMessages.errorNotificationTitle),
|
||||
text: formatMessage(unauthorizedMessages.accountSwitchFailed),
|
||||
type: 'error',
|
||||
|
||||
@@ -28,5 +28,5 @@ export function setupProviders(auth: Awaited<ReturnType<typeof useAuth>>) {
|
||||
setupLoadingStateProvider()
|
||||
setupUserCountryProvider()
|
||||
|
||||
return userPreferences
|
||||
return { notificationManager, userPreferences }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user