fix consumption

This commit is contained in:
2026-01-20 12:56:21 +00:00
parent c73f229b67
commit 203b241dfa
2 changed files with 29 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
<script setup>
import OptionalLinkTable from "@/components/quick/OptionalLinkTable.vue";
const arr = [
const data = [
{
type: "Substack",
name: "By Ellie",
@@ -59,7 +59,7 @@ const arr = [
<div class="flex-col center-content">
<h2>Consumption</h2>
<div class="scroll fill">
<OptionalLinkTable :data="arr" />
<OptionalLinkTable :data="data" />
</div>
</div>
</template>

View File

@@ -0,0 +1,27 @@
<script setup>
// Array will have the form
// [ {type: string, name: string, link?: string}]
const props = defineProps({
data: {
type: Array,
required: true,
},
});
const keys = ["type", "name", "link"];
</script>
<template>
<table>
<tbody>
<tr v-for="item in data" :key="item.id">
<th>{{ item.type }}</th>
<td v-if="item.link">
<a :href="item.link">{{ item.name }}</a>
</td>
<td v-else>{{ item.name }}</td>
</tr>
</tbody>
</table>
</template>