Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
34 changes: 17 additions & 17 deletions src/app/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Others/Qualification.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]"),
Expand Down
2 changes: 1 addition & 1 deletion tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ function addVariablesForColors({ addBase, theme }) {
addBase({
":root": newVars,
});
}
}