This commit is contained in:
amirhosein.ashourloo
2026-08-10 13:07:14 +03:30
parent 95c3c74276
commit c4e8a54623
15 changed files with 341 additions and 58 deletions
+4 -3
View File
@@ -8,7 +8,7 @@ import { Services } from "@/components/Services";
import { SiteFooter } from "@/components/SiteFooter";
import { SiteHeader } from "@/components/SiteHeader";
import { contact, site } from "@/data/site";
import { getPortfolios, toDisplayProject } from "@/lib/api";
import { getBlogs, getPortfolios, toDisplayNewsItem, toDisplayProject } from "@/lib/api";
const organizationJsonLd = {
"@context": "https://schema.org",
@@ -29,8 +29,9 @@ const organizationJsonLd = {
};
export default async function HomePage() {
const portfolios = await getPortfolios();
const [portfolios, newsPosts] = await Promise.all([getPortfolios(), getBlogs("news")]);
const displayProjects = portfolios.map(toDisplayProject);
const displayNews = newsPosts.slice(0, 3).map(toDisplayNewsItem);
return (
<>
@@ -47,7 +48,7 @@ export default async function HomePage() {
<Marquee />
<Projects projects={displayProjects} />
<Services />
<News />
<News items={displayNews} />
<ContactCta />
</main>