Skip to content

Commit

Permalink
Fix company links from inside app details page
Browse files Browse the repository at this point in the history
  • Loading branch information
ddxv committed Sep 19, 2024
1 parent 9aaddcb commit 55614ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions frontend/src/lib/ManifestItemList.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
export let title: string;
export let items: Record<string, string[]> | Trackers | Networks = {};
export let basePath: string = '';
export let osPath: string = '';
const basePath: string = 'adtech/companies';
const androidNameFont = 'h6 px-8 md:px-16';
const xmlPathFont = 'h5 px-4 md:px-8';
Expand All @@ -29,7 +30,7 @@
<p class="h4 mt-4">
<a
class="btn hover:bg-primary-hover-token variant-ghost-primary"
href={`/${basePath}/${key}`}>{key}</a
href={`/${basePath}/${key}/${osPath}/overall`}>{key}</a
>
</p>
{#each Object.entries(value) as [xml_path, androidNames]}
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/routes/apps/[id]/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import RankChart from '$lib/RankChart.svelte';
import AppHistoryTable from '$lib/AppHistoryTable.svelte';
let sum = (arr: number[]) => arr.reduce((acc, curr) => acc + curr, 0);
$: storeName = data.myapp.store_link.includes('google') ? 'Google' : 'Apple';
</script>

<svelte:head>
Expand Down Expand Up @@ -236,11 +237,11 @@
</div>
{/if}
{#if packageInfo.trackers && Object.keys(packageInfo.trackers).length > 0}
<ManifestItemList items={packageInfo.trackers} title="Trackers" basePath="trackers"
<ManifestItemList items={packageInfo.trackers} title="Trackers" osPath={storeName}
></ManifestItemList>
{/if}
{#if packageInfo.networks && Object.keys(packageInfo.networks).length > 0}
<ManifestItemList items={packageInfo.networks} title="Ad Networks" basePath="networks"
<ManifestItemList items={packageInfo.networks} title="Ad Networks" osPath={storeName}
></ManifestItemList>
{/if}
{#if packageInfo.leftovers && Object.keys(packageInfo.leftovers).length > 0}
Expand Down

0 comments on commit 55614ab

Please sign in to comment.