diff --git a/src/components/Changelog.tsx b/src/components/Changelog.tsx
new file mode 100644
index 0000000..6470346
--- /dev/null
+++ b/src/components/Changelog.tsx
@@ -0,0 +1,57 @@
+import { useEffect, useState } from "react";
+import { ChangelogEntry } from "~/components/ChangelogEntry";
+
+export interface LogEntry {
+ content: string;
+ data: {
+ title: string;
+ date: string;
+ };
+ isEmpty: boolean;
+ excerpt: string;
+}
+
+export const Changelog = () => {
+ const [entries, setEntries] = useState([] as LogEntry[]);
+ const [loaded, setLoaded] = useState(false);
+
+ const getEmployees = () => {
+ fetch("https://xnl.hri7566.info/api/changelog?n=5", {
+ next: {
+ revalidate: 60,
+ },
+ })
+ .then((res) => {
+ res
+ .json()
+ .then((j) => {
+ setEntries((j as any).logs as LogEntry[]);
+ setLoaded(true);
+ })
+ .catch((err) => console.error(err));
+ })
+ .catch((err) => console.error(err));
+ };
+
+ useEffect(() => {
+ getEmployees();
+ }, []);
+
+ return (
+ <>
+ {/*
Loading...
+ )} + > + ); +}; diff --git a/src/components/ChangelogEntry.tsx b/src/components/ChangelogEntry.tsx new file mode 100644 index 0000000..bcf0211 --- /dev/null +++ b/src/components/ChangelogEntry.tsx @@ -0,0 +1,18 @@ +export const ChangelogEntry = ( + props: { + title: string; + date: string; + content: string; + } = { + title: "Title", + date: "Date", + content: "Content", + } +) => { + return ( +