Added CSRF & YouTube and dark mode

This commit is contained in:
cdricms
2025-01-22 17:39:03 +01:00
parent 48e761667f
commit 5a5846d853
29 changed files with 1186 additions and 280 deletions

View File

@@ -9,21 +9,19 @@ export default async function HistoryDetails({
params: Promise<{ blog_id: string }>;
}) {
const { blog_id } = await params;
let blog = {}
let blog = {};
try {
const res = await fetch('http://localhost:3001/blogs/' + blog_id, {method: "GET"})
blog = await res.json()
console.log(blog as Blog)
} catch(e) {
const res = await fetch("http://localhost:3001/blogs/" + blog_id, {
method: "GET",
});
blog = await res.json();
console.log(blog as Blog);
} catch (e) {
console.log(e);
}
if(blog == null) {
return(
<>
Error
</>
)
if (blog == null) {
return <>Error</>;
}
const blog_item_params: BlogItemParams = {