Skip to content

Commit

Permalink
feat: fetch data about me
Browse files Browse the repository at this point in the history
  • Loading branch information
moonbamijam committed Feb 12, 2024
1 parent 1d3c633 commit ebbab75
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@ async function HandleTopics() {
}
};

// async function HandleAboutMe() {
// try {
// const response = await fetch(process.env.URL + `/api/abouts`, {
// cache: 'no-store',
// method: 'GET'
// });
async function HandleAboutMe() {
try {
const response = await fetch(process.env.URL + `/api/abouts`, {
cache: 'no-store',
method: 'GET'
});

// return await response.json();
return await response.json();

// } catch (error) {
// console.log(error);
// }
// };
} catch (error) {
console.log(error);
}
};

const Home = async () => {
const { topics } = await HandleTopics()
// const { abouts } = await HandleAboutMe()
const { topics } = await HandleTopics();
const { abouts } = await HandleAboutMe();
return (
<>
<Image priority src={ AkaneDream } alt="" id="home-bg" width={'3000'} height={'3000'} className="w-full h-[930px] object-cover absolute z-[-100] opacity-[0.5] dark:opacity-[0.3] " />
Expand All @@ -76,7 +76,7 @@ const Home = async () => {
<div className="about-me w-full flex flex-col lg:flex-row justify-between items-center lg:items-start 2xl:justify-evenly ">
<TopicImage src={ Me } />
<div className="about-me flex flex-col gap-[30px] ">
{/* {abouts.map((about: AboutType) => (
{abouts.map((about: AboutType) => (
<About
key={ about._id }
displayName={ about.displayName }
Expand All @@ -89,7 +89,7 @@ const Home = async () => {
nationality={ about.nationality }
status={ about.status }
languages={ about.languages }/>
))} */}
))}
</div>
</div>
<div className="topics w-full grid grid-cols-1 lg:grid-cols-2 gap-10 ">
Expand Down

0 comments on commit ebbab75

Please sign in to comment.