chore: adapt admin pages to new PostListResponse shape
This commit is contained in:
parent
a2ec043c59
commit
31b83cd449
@ -55,7 +55,7 @@ pub fn Admin() -> Element {
|
|||||||
"最近文章"
|
"最近文章"
|
||||||
}
|
}
|
||||||
match &*posts_res.read() {
|
match &*posts_res.read() {
|
||||||
Some(Ok(PostListResponse { posts })) => {
|
Some(Ok(PostListResponse { posts, .. })) => {
|
||||||
rsx! {
|
rsx! {
|
||||||
div { class: "space-y-0",
|
div { class: "space-y-0",
|
||||||
for post in posts.iter().take(5) {
|
for post in posts.iter().take(5) {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ pub fn Posts() -> Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
match &*posts_res.read() {
|
match &*posts_res.read() {
|
||||||
Some(Ok(PostListResponse { posts })) => {
|
Some(Ok(PostListResponse { posts, .. })) => {
|
||||||
if posts.is_empty() {
|
if posts.is_empty() {
|
||||||
rsx! {
|
rsx! {
|
||||||
div { class: "text-center py-20 text-gray-500 dark:text-[#9b9c9d]",
|
div { class: "text-center py-20 text-gray-500 dark:text-[#9b9c9d]",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user