transactions are now printing to the page

This commit is contained in:
Annika
2022-07-11 15:12:27 -06:00
parent 10d044cb0e
commit 6455c02d5e
6 changed files with 86 additions and 19 deletions
+28 -3
View File
@@ -2,16 +2,30 @@
<div class="component">
<div class="flex mt-6 md:mx-40 flex-col">
<h1>Transactions Container</h1>
<Transaction v-for="t in 10" />
<Transaction v-for="t in transactions" :key="t._id" :transaction="t" />
</div>
</div>
</template>
<script>
import { computed, onMounted } from 'vue'
import { AppState } from '../AppState'
import { transactionsService } from '../services/TransactionsService'
import { logger } from '../utils/Logger'
export default {
setup(){
return {}
onMounted(async () => {
try {
await transactionsService.getAll()
} catch (error) {
logger.log(error)
}
})
return {
transactions: computed(() => AppState.transactions)
}
}
}
</script>
@@ -19,4 +33,15 @@ export default {
<style lang="scss" scoped>
</style>
</style>
<!-- const route = useRoute()
onMounted(async () => {
try {
await supportsService.getSupportsByProject(route.params.id)
} catch (error) {
Pop.error(error)
}
}) -->
<!-- tiers: computed(() => AppState.tiers) -->