mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 00:55:25 +00:00
fix: modpack content deleted from api breaks card (#7146)
This commit is contained in:
@@ -15,7 +15,7 @@ export type InstanceContentData = {
|
||||
|
||||
export type InstanceContentModpackData = {
|
||||
project: ManagedContentProject
|
||||
version: ManagedContentVersion
|
||||
version: ManagedContentVersion | null
|
||||
updateVersionId: string | null
|
||||
}
|
||||
|
||||
@@ -53,10 +53,12 @@ function normalizeLinkedModpackInfo(
|
||||
slug: modpackInfo.project.slug ?? modpackInfo.project.id,
|
||||
icon_url: modpackInfo.project.icon_url ?? undefined,
|
||||
},
|
||||
version: {
|
||||
...modpackInfo.version,
|
||||
date_published: modpackInfo.version.date_published.toString(),
|
||||
},
|
||||
version: modpackInfo.version
|
||||
? {
|
||||
...modpackInfo.version,
|
||||
date_published: modpackInfo.version.date_published.toString(),
|
||||
}
|
||||
: null,
|
||||
updateVersionId: modpackInfo.update_version_id,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ export async function refresh_content_updates(instanceId: string): Promise<void>
|
||||
// Linked modpack info returned from backend
|
||||
export interface LinkedModpackInfo {
|
||||
project: Labrinth.Projects.v2.Project
|
||||
version: Labrinth.Versions.v2.Version
|
||||
version: Labrinth.Versions.v2.Version | null
|
||||
owner: ContentOwner | null
|
||||
has_update: boolean
|
||||
update_version_id: string | null
|
||||
|
||||
Reference in New Issue
Block a user