fix(frontend/blog/post) fix compatibility with new backend

- switch to axios
This commit is contained in:
lumither committed 2024-05-04 22:54:38 +08:00
1 parent 4f09648a34
commit a4d0b7140a
4 files changed
+24 -11

No files matched your search

+3 -1
View File
@@ -1,6 +1,7 @@
import React from 'react';
import { Card, CardBody, CardHeader } from '@nextui-org/card';
import { Divider } from '@nextui-org/react';
import Link from 'next/link';
type Props = {
post: JSON
@@ -10,13 +11,14 @@ function BlogPostCard({ post }: Props) {
let title = (post as any)['title'];
let summary = (post as any)['summary'];
let last_update = (post as any)['last_update'];
let post_id = (post as any)['post_id'];
return (
<div>
{/*todo: to be update*/ }
{/*<Link href={ `/blog/${ name }` }>*/ }
<Card>
<Card as={ Link } href={ `/blog/post/${ post_id }` }>
<CardHeader>
<p className={ 'font-bold' }>{ title }</p>
</CardHeader>