import { createSignal, onMount } from "solid-js"; import Table from "../components/Table"; import { Histori } from "../types/Histori"; import supabase from "../utils/supabase"; import { getDates } from "../utils/dates"; export default function () { const [items, setItems] = createSignal([]); const getData = async () => { const { data } = await supabase .from("histori_fermentasi") .select("*") .order("created_at", { ascending: false }) .range(0, 10); setItems(data as Histori[]); }; onMount(async () => { await getData(); }); return (
Histori

Menampilkan hasil fermentasi yang telah dilakukan.

[ getDates(item.created_at), Math.round((item.waktu_akhir - item.waktu_awal) / 3600) + " Jam", item.rentang_suhu, {item.berhasil ? "SUKSES" : "GAGAL"} , ])} class="my-5" >
); }