23 lines
527 B
Vue
23 lines
527 B
Vue
<script setup lang="ts">
|
|
import type { PotView } from '~/types';
|
|
|
|
const route = useRoute();
|
|
const slug = route.params.slug as string;
|
|
|
|
const { data, refresh } = await useFetch<PotView>(`/api/pots/${slug}`);
|
|
</script>
|
|
|
|
<template>
|
|
<section v-if="data">
|
|
<BalanceSummary
|
|
:slug="slug"
|
|
:participants="data.participants"
|
|
:net-balances="data.netBalances"
|
|
:settlements="data.settlements"
|
|
:currency="data.pot.currency"
|
|
@settled="refresh"
|
|
@updated="refresh"
|
|
/>
|
|
</section>
|
|
</template>
|