diff --git a/frontend/src/routes/apps/[id]/+page.svelte b/frontend/src/routes/apps/[id]/+page.svelte index d397a53..834b730 100644 --- a/frontend/src/routes/apps/[id]/+page.svelte +++ b/frontend/src/routes/apps/[id]/+page.svelte @@ -16,6 +16,16 @@ let { data }: Props = $props(); let sum = (arr: number[]) => arr.reduce((acc, curr) => acc + curr, 0); + + function getCategoryName(category: string) { + if (category) { + return ( + data?.appCats?.categories?.find((cat: { id: string }) => cat.id == category)?.name || + category + ); + } + return ''; + } @@ -25,11 +35,15 @@ {myapp.name} Android Trends | {myapp.developer_name} | AppGoblin App Data
- Category: {myapp.category} + Category: {getCategoryName(myapp.category)}
@@ -436,6 +450,7 @@ {/if} {/if} {/await} + diff --git a/frontend/src/types.ts b/frontend/src/types.ts index 91ea2d4..9aab42e 100644 --- a/frontend/src/types.ts +++ b/frontend/src/types.ts @@ -319,6 +319,7 @@ export interface CompanyCategoryDetails { export interface AppFullDetails { myapp: AppFullDetail; companyTypes: CompanyTypes; + appCats: CatData; status?: number; error?: string; myranks: Promise<{ latest: AppRankDetail[]; history: AppRankDetail[] }>;