fix: usage page links

This commit is contained in:
Arman
2024-09-10 12:27:07 +02:00
parent 8eb829741c
commit 62ab802c9c
@@ -18,10 +18,11 @@
import { formatNum } from '$lib/helpers/string';
import { total } from '$lib/layout/usage.svelte';
import { BillingPlan } from '$lib/constants.js';
import { base } from '$app/paths';
export let data;
$: base = `${base}/project-${data.project.$id}`;
$: baseRoute = `${base}/project-${data.project.$id}`;
$: network = data.usage.network;
$: users = data.usage.users;
$: usersTotal = data.usage.usersTotal;
@@ -44,6 +45,8 @@
// label: toLocaleDate(invoice.from),
// value: invoice.$id
// }));
$: console.log(data.usage.executionsBreakdown);
</script>
<Container>
@@ -237,7 +240,7 @@
{formatNum(func.value)} executions
</TableCell>
<TableCellLink
href={`${base}/functions/function-${func.resourceId}`}
href={`${baseRoute}/functions/function-${func.resourceId}`}
title="View function">
View function
</TableCellLink>
@@ -296,7 +299,7 @@
{humanized.value}{humanized.unit}
</TableCell>
<TableCellLink
href={`${base}/storage/bucket-${bucket.resourceId}`}
href={`${baseRoute}/storage/bucket-${bucket.resourceId}`}
title="View bucket">
View bucket
</TableCellLink>