refactor: TabbedModal to use NewModal and DI (#5612)
* refactor: tabbed modal to use NewModal * refactor: use DI for instance settings modal instead of passing down props * pnpm prepr
This commit is contained in:
14
apps/app-frontend/src/providers/instance-settings.ts
Normal file
14
apps/app-frontend/src/providers/instance-settings.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { createContext } from '@modrinth/ui'
|
||||
import type { Ref } from 'vue'
|
||||
|
||||
import type { GameInstance } from '@/helpers/types'
|
||||
|
||||
export interface InstanceSettingsContext {
|
||||
instance: GameInstance
|
||||
offline?: boolean
|
||||
isMinecraftServer: Ref<boolean>
|
||||
onUnlinked: () => void
|
||||
}
|
||||
|
||||
export const [injectInstanceSettings, provideInstanceSettings] =
|
||||
createContext<InstanceSettingsContext>('InstanceSettingsModal', 'instanceSettings')
|
||||
Reference in New Issue
Block a user