Added CSRF & YouTube and dark mode
This commit is contained in:
@@ -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 = {
|
||||
|
||||
Reference in New Issue
Block a user