minor changes: (faulty)

This commit is contained in:
2026-04-26 16:16:52 +02:00
parent c9410191a9
commit 80a6fa2606
4 changed files with 38 additions and 8 deletions
@@ -0,0 +1,31 @@
import { useEffect, useState } from "react";
import ReactMarkdown from "react-markdown";
const fetchREADME = async (url) => {
try {
const response = await fetch(url);
if (!response.ok) throw new Error("Failed to fetch README");
return await response.text();
} catch (error) {
console.error(error);
return "Error fetching README.";
}
};
export default function ProjectsReadme() {
const [readmeContent, setReadmeContent] = useState("");
useEffect(() => {
fetchREADME(
// "https://git.aramjonghu.nl/AramJonghu/aramjonghu-site/src/branch/master/README.md",
"../../../README.md",
).then((content) => setReadmeContent(content));
}, []);
return (
<div>
<h2>README Content</h2>
<ReactMarkdown>{readmeContent}</ReactMarkdown>
</div>
);
}