2024-09-25 22:20:47 +02:00
|
|
|
<script lang="ts">
|
|
|
|
import Select from "./Select.svelte"
|
2024-09-28 15:33:31 +02:00
|
|
|
import { getCollection } from "astro:content"
|
|
|
|
|
|
|
|
getCollection("hardware")
|
|
|
|
.then((collection) => {
|
|
|
|
console.log(collection)
|
|
|
|
})
|
|
|
|
|
|
|
|
// TODO fetch selected hardware from content collection
|
|
|
|
let selectedHardware: string = "CPU"
|
2024-09-25 22:20:47 +02:00
|
|
|
|
|
|
|
function onChange({ detail }: CustomEvent<string>) {
|
|
|
|
console.log(detail)
|
2024-09-28 15:33:31 +02:00
|
|
|
selectedHardware = detail
|
2024-09-25 22:20:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
// TODO show the selected hardware
|
|
|
|
</script>
|
2024-09-28 15:33:31 +02:00
|
|
|
<div>
|
|
|
|
<h2>{selectedHardware}</h2>
|
|
|
|
<Select options={["CPU", "GPU", "RAM"]} on:change={onChange} />
|
|
|
|
</div>
|