Moshavereh sazmani
This commit is contained in:
+2
-3
@@ -2,7 +2,6 @@ import ContentSection from "@/components/content-1";
|
||||
import Features from "@/components/features-12";
|
||||
import { FeaturedPostsGrid } from "@/components/featured-posts-grid";
|
||||
import { getPosts } from "@/lib/wp-api";
|
||||
import { HeroHeader } from "@/components/header";
|
||||
import HeroSection from "@/components/hero-section";
|
||||
|
||||
const FEATURED_CATEGORY_ID = 3;
|
||||
@@ -17,9 +16,9 @@ export default async function Home() {
|
||||
orderby: "date",
|
||||
order: "desc",
|
||||
});
|
||||
featuredPosts = result.posts;
|
||||
featuredPosts = result?.posts ?? [];
|
||||
} catch {
|
||||
// بدون پست هم صفحه رندر میشود
|
||||
featuredPosts = [];
|
||||
}
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user