fix, rename, clean

This commit is contained in:
rca 2024-07-21 22:57:37 +09:00
parent 7d073e92c1
commit 9c7de87dd2

View File

@ -9,19 +9,19 @@
</template>
<script setup lang="ts">
import { TaskBaseItem } from 'src/models/task';
import { HistoryItem } from 'src/models/internal';
import { computed } from 'vue';
interface Props {
tasks: TaskBaseItem[];
histories: HistoryItem[];
}
// Props
const props = defineProps<Props>();
const amount = computed(() => {
return props.tasks.reduce((acc, task) => acc + task.reward, 0);
return props.histories.reduce((acc, history) => acc + history.reward, 0);
});
</script>