import { h, type FunctionComponent } from 'preact' import { useEffect, useState } from 'preact/hooks' import rek from 'rek' import { Table, Td } from './table.tsx' const GitLog: FunctionComponent = () => { const [commits, setCommits] = useState(null) useEffect(() => { rek('/api/git-log').then(setCommits) }, []) return ( commits && ( {commits.map((commit) => ( ))}
{new Date(commit.date).toLocaleString('sv-SE')} {commit.author} {commit.message} ( {commit.hash.slice(0, 6)} )
) ) } export default GitLog