Files
aragrp/app/page.tsx
T

39 lines
1.1 KiB
TypeScript
Raw Normal View History

2026-02-19 22:57:49 +03:30
import type { Metadata } from "next";
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 HeroSection from "@/components/hero-section";
2026-02-19 22:57:49 +03:30
export const metadata: Metadata = {
description:
"فیپ؛ راهکارهای یکپارچه و هوشمند برای اتصال سیستم‌ها، اتوماسیون فرآیندها و بهره‌وری کسب‌وکار.",
};
const FEATURED_CATEGORY_ID = 3;
const FEATURED_POSTS_COUNT = 4;
export default async function Home() {
let featuredPosts: Awaited<ReturnType<typeof getPosts>>["posts"] = [];
try {
const result = await getPosts({
categoryId: FEATURED_CATEGORY_ID,
perPage: FEATURED_POSTS_COUNT,
orderby: "date",
order: "desc",
});
2026-02-19 17:56:02 +03:30
featuredPosts = result?.posts ?? [];
} catch {
2026-02-19 17:56:02 +03:30
featuredPosts = [];
}
return (
<>
<HeroSection />
<Features />
<ContentSection />
<FeaturedPostsGrid posts={featuredPosts} />
</>
);
}