From e88272c7da8bc0b81e4662d175c7cc9e882a15be Mon Sep 17 00:00:00 2001 From: developer-mezbah Date: Fri, 7 Jun 2024 21:43:46 +0600 Subject: [PATCH] first commit --- package.json | 2 +- src/app/page.js | 34 ++++++++++++------------- src/components/Others/Qualification.jsx | 4 +-- tailwind.config.js | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index bfee0df..70ab1c0 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "build": "next build", - "start": "NODE_ENV=production node server.js", + "start": "next start", "lint": "next lint" }, "dependencies": { diff --git a/src/app/page.js b/src/app/page.js index 0b70ddb..5b4dbd7 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -11,25 +11,25 @@ async function getData() { try { const prisma = new PrismaClient(); let hero_data = await prisma.hero.findFirst({}); - let educationQualify = await prisma.qualification.findMany({ - where: { role: "Education" }, - }); - let workQualify = await prisma.qualification.findMany({ - where: { role: "Work" }, - orderBy: {id: "desc"} - }); - const marque = await prisma.marquee.findFirst({}); - const testimonial = await prisma.Testimonial.findMany({ - orderBy: { id: "desc" }, - }); + // let educationQualify = await prisma.qualification.findMany({ + // where: { role: "Education" }, + // }); + // let workQualify = await prisma.qualification.findMany({ + // where: { role: "Work" }, + // orderBy: {id: "desc"} + // }); + // const marque = await prisma.marquee.findFirst({}); + // const testimonial = await prisma.Testimonial.findMany({ + // orderBy: { id: "desc" }, + // }); - const social = await prisma.Social_media.findFirst({}); - const allProjects = await prisma.projects.findMany({ - take: 4, - orderBy: {id: 'desc'}, - }); + // const social = await prisma.Social_media.findFirst({}); + // const allProjects = await prisma.projects.findMany({ + // take: 4, + // orderBy: {id: 'desc'}, + // }); - const sectionDetails = await prisma.section_details.findFirst({}); + // const sectionDetails = await prisma.section_details.findFirst({}); return { hero_data, educationQualify,workQualify,marque,testimonial,social,allProjects,sectionDetails }; } catch (error) { diff --git a/src/components/Others/Qualification.jsx b/src/components/Others/Qualification.jsx index 3401759..b0300d4 100644 --- a/src/components/Others/Qualification.jsx +++ b/src/components/Others/Qualification.jsx @@ -6,8 +6,8 @@ import { FcCalendar } from "react-icons/fc"; import { motion } from "framer-motion"; const Qualification = ({ workQualify, educationQualify, sectionDetails }) => { - const workLastIndex = workQualify.slice(-1)[0]?.id; - const educationLastIndex = educationQualify.slice(-1)[0]?.id; + const workLastIndex = workQualify?.slice(-1)[0]?.id; + const educationLastIndex = educationQualify?.slice(-1)[0]?.id; useEffect(() => { const tabs = document.querySelectorAll("[data-target]"), diff --git a/tailwind.config.js b/tailwind.config.js index ae24a42..1ab83c7 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -63,4 +63,4 @@ function addVariablesForColors({ addBase, theme }) { addBase({ ":root": newVars, }); -} +} \ No newline at end of file