mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26:21 +00:00
fix(frontend/Blog) fix compatibility with new backend
This commit is contained in:
3 files changed
+42
-46
No files matched your search
+19
-14
@@ -1,5 +1,4 @@
|
||||
import React from 'react';
|
||||
import Link from 'next/link';
|
||||
import { Card, CardBody, CardHeader } from '@nextui-org/card';
|
||||
import { Divider } from '@nextui-org/react';
|
||||
|
||||
@@ -8,23 +7,29 @@ type Props = {
|
||||
}
|
||||
|
||||
function BlogPostCard({ post }: Props) {
|
||||
const name = (post as any)['name'];
|
||||
const { title, desc } = (post as any)['meta'] as { title: string, desc: string };
|
||||
let title = (post as any)['title'];
|
||||
let summary = (post as any)['summary'];
|
||||
let last_update = (post as any)['last_update'];
|
||||
|
||||
return (
|
||||
|
||||
<div>
|
||||
{/*todo: to be update*/ }
|
||||
{/*<Link href={ `/blog/${ name }` }>*/}
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<p className={ 'font-bold' }>{ title }</p>
|
||||
</CardHeader>
|
||||
<Divider />
|
||||
<CardBody>
|
||||
{ desc }
|
||||
</CardBody>
|
||||
</Card>
|
||||
{/*</Link>*/}
|
||||
{/*<Link href={ `/blog/${ name }` }>*/ }
|
||||
<Card>
|
||||
<CardHeader>
|
||||
<p className={ 'font-bold' }>{ title }</p>
|
||||
</CardHeader>
|
||||
<Divider />
|
||||
<CardBody>
|
||||
{ summary }
|
||||
</CardBody>
|
||||
<Divider />
|
||||
<CardBody>
|
||||
{ last_update }
|
||||
</CardBody>
|
||||
</Card>
|
||||
{/*</Link>*/ }
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
Reference in new issue
Block a user