@@ -76,9 +66,9 @@ export default function AboutMe() {
)}
- {aboutMe?.image ? (
+ {data?.image ? (
diff --git a/src/app/page.tsx b/src/app/page.tsx
index 3c5df12..ddf1d17 100644
--- a/src/app/page.tsx
+++ b/src/app/page.tsx
@@ -5,12 +5,39 @@ import AboutMe from "./_components/about-me/page";
import Services from "./_components/services/page";
import MyProjects from "./_components/my-projects/page";
-export default function Home() {
+type SkillType = {
+ id: 1;
+ title: string;
+ image: string;
+ description: string;
+ link: string;
+ percentage: number;
+ about_me_id: number;
+ created_at: string;
+ updated_at: string;
+};
+
+type AboutMeDataType = {
+ id: number;
+ title: string;
+ description: string;
+ image: string;
+ created_at: string;
+ updated_at: string;
+ skills: SkillType[];
+};
+
+export default async function Home() {
+ const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/about-me`, {
+ cache: "no-store", // غیرفعال کردن کش
+ });
+ let aboutMeData: AboutMeDataType = await response.json();
+
return (
{/* Home */}
{/* start */}
@@ -81,7 +108,7 @@ export default function Home() {
-
+
@@ -93,4 +120,3 @@ export default function Home() {
);
}
-