diff --git a/package.json b/package.json index 86de81b..38e66d8 100644 --- a/package.json +++ b/package.json @@ -26,14 +26,14 @@ "next-pwa": "^5.6.0", "nodemailer": "^6.9.16", "otplib": "^12.0.1", - "react-icons": "^5.4.0", + "react-icons": "^5.4.0", "react": "^18", "react-dom": "^18", "react-toastify": "^11.0.2", "sass": "^1.71.1", "typescript": "^5.6.3", + "uuid": "^11.0.3", "zod": "^3.24.1" - }, "devDependencies": { "@types/react": "18.3.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c693908..8bb869f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -24,7 +24,7 @@ importers: version: 8.5.1(react@18.2.0) eslint-config-airbnb: specifier: ^19.0.4 - version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1) + version: 19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1) js-cookie: specifier: ^3.0.5 version: 3.0.5 @@ -70,6 +70,9 @@ importers: typescript: specifier: ^5.6.3 version: 5.7.2 + uuid: + specifier: ^11.0.3 + version: 11.0.3 zod: specifier: ^3.24.1 version: 3.24.1 @@ -5518,6 +5521,13 @@ packages: integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==, } + uuid@11.0.3: + resolution: + { + integrity: sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==, + } + hasBin: true + watchpack@2.4.2: resolution: { @@ -7514,20 +7524,20 @@ snapshots: escape-string-regexp@4.0.0: {} - eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1))(eslint@8.57.1): + eslint-config-airbnb-base@15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): dependencies: confusing-browser-globals: 1.0.11 eslint: 8.57.1 - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) object.assign: 4.1.5 object.entries: 1.1.8 semver: 6.3.1 - eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1): + eslint-config-airbnb@19.0.4(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1))(eslint-plugin-jsx-a11y@6.10.2(eslint@8.57.1))(eslint-plugin-react-hooks@5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1))(eslint-plugin-react@7.37.2(eslint@8.57.1))(eslint@8.57.1): dependencies: eslint: 8.57.1 - eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) + eslint-config-airbnb-base: 15.0.0(eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-react: 7.37.2(eslint@8.57.1) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1) @@ -7542,7 +7552,7 @@ snapshots: eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.1) eslint-plugin-react: 7.37.2(eslint@8.57.1) eslint-plugin-react-hooks: 5.0.0-canary-7118f5dd7-20230705(eslint@8.57.1) @@ -7577,7 +7587,7 @@ snapshots: is-glob: 4.0.3 stable-hash: 0.0.4 optionalDependencies: - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1) transitivePeerDependencies: - supports-color @@ -7592,7 +7602,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.1): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.21.0(eslint@8.57.1)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.29.1(eslint@8.57.1))(eslint@8.57.1))(eslint@8.57.1): dependencies: array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 @@ -9335,6 +9345,8 @@ snapshots: util-deprecate@1.0.2: {} + uuid@11.0.3: {} + watchpack@2.4.2: dependencies: glob-to-regexp: 0.4.1 diff --git a/public/images/placeholder_image.jpg b/public/images/placeholder_image.jpg new file mode 100644 index 0000000..0dbc768 Binary files /dev/null and b/public/images/placeholder_image.jpg differ diff --git a/src/app/(pages)/developers/page.jsx b/src/app/(pages)/developers/page.jsx index 3ca9d90..202666a 100644 --- a/src/app/(pages)/developers/page.jsx +++ b/src/app/(pages)/developers/page.jsx @@ -7,6 +7,17 @@ import Image from "next/image"; import styles from "./developers.module.scss"; import developers from "../../../../public/data/developer.json"; +export async function generateMetadata() { + return { + title: "Developers | E-cell, NIT Silchar", + description: "Meet the developers from E-cell, NIT Silchar.", + openGraph: { + title: "Developers | E-cell, NIT Silchar", + description: "Meet the developers from E-cell, NIT Silchar.", + }, + }; +} + const Developers = () => { return (
diff --git a/src/app/(pages)/feedback/page.jsx b/src/app/(pages)/feedback/Feedback.jsx similarity index 100% rename from src/app/(pages)/feedback/page.jsx rename to src/app/(pages)/feedback/Feedback.jsx diff --git a/src/app/(pages)/feedback/page.tsx b/src/app/(pages)/feedback/page.tsx new file mode 100644 index 0000000..4947896 --- /dev/null +++ b/src/app/(pages)/feedback/page.tsx @@ -0,0 +1,17 @@ +import Feedback from "./Feedback"; + +// Dynamic Metadata +export async function generateMetadata() { + return { + title: "Feedback | Share Your Experience", + description: "We value your feedback! Share your experience with us.", + openGraph: { + title: "Feedback | Share Your Experience", + description: "We value your feedback! Share your experience with us.", + }, + }; +} + +export default function FeedbackPage() { + return ; +} diff --git a/src/app/(pages)/pricing/page.jsx b/src/app/(pages)/pricing/page.jsx index 4a0a64e..8038e98 100644 --- a/src/app/(pages)/pricing/page.jsx +++ b/src/app/(pages)/pricing/page.jsx @@ -8,14 +8,14 @@ const Pricing = () => { return (
-
-

- What others are saying about us? -

-
+
+

+ What others are saying about us? +

+
diff --git a/src/app/(pages)/resetPassword/page.tsx b/src/app/(pages)/resetPassword/page.tsx index 20ec563..e36ec87 100644 --- a/src/app/(pages)/resetPassword/page.tsx +++ b/src/app/(pages)/resetPassword/page.tsx @@ -12,7 +12,7 @@ import { } from "../../../schemas/resetPasswordSchema"; import Form from "../../components/Forms/basicForm"; -const SignUp = () => { +const ResetPassword = () => { const [isOtpSent, setIsOtpSent] = useState(false); // State to manage if OTP is sent or not const [usernameOrEmail, setUsernameOrEmail] = useState(); // State to manage OTP input const [validationErrors, setValidationErrors] = useState<{ @@ -264,4 +264,4 @@ const SignUp = () => { ); }; -export default SignUp; +export default ResetPassword; diff --git a/src/app/(pages)/team/TeamMember.jsx b/src/app/(pages)/team/TeamMember.jsx new file mode 100644 index 0000000..ed14058 --- /dev/null +++ b/src/app/(pages)/team/TeamMember.jsx @@ -0,0 +1,62 @@ +"use client"; + +import { useEffect, useState } from "react"; +import Image from "next/image"; +import styles from "./team.module.scss"; +import "../../globals.scss"; + +const Team = () => { + const [teamMembers, setTeamMembers] = useState([]); + const [error, setError] = useState(""); + + useEffect(() => { + const fetchTeamMembers = async () => { + try { + const res = await fetch("/api/v1/getAllTeamMembers", { + method: "GET", + headers: { + "Content-Type": "application/json", + }, + }); + const data = await res.json(); + + if (!res.ok) { + throw new Error(data.message || "Failed to fetch team members"); + } + setTeamMembers(data.teamMembers); + } catch (err) { + console.error(err.message); + setError("Failed to load team members."); + } + }; + fetchTeamMembers(); + }, []); + + if (error) { + return

{error}

; + } + + return ( +
+

Team Members

+
+ {teamMembers.map((member) => { + return ( +
+ {member.name} +

{member.name}

+

{member.designation}

+
+ ); + })} +
+
+ ); +}; +export default Team; diff --git a/src/app/(pages)/team/page.jsx b/src/app/(pages)/team/page.jsx index 5862e06..250851a 100644 --- a/src/app/(pages)/team/page.jsx +++ b/src/app/(pages)/team/page.jsx @@ -1,34 +1,16 @@ -/* eslint-disable @next/next/no-img-element */ +import Team from "./TeamMember"; -/* eslint-disable import/extensions */ -/* eslint-disable no-unused-vars */ -import Image from "next/image"; -import styles from "./team.module.scss"; -import "../../globals.scss"; -import teamMembers from "../../../../public/data/team.json"; - -const Team = () => { - return ( -
-

Team Members

-
- {teamMembers.map((member) => { - return ( -
- {member.name} -

{member.name}

-

{member.role}

-
- ); - })} -
-
- ); +export const metadata = { + title: "Meet Our Team | Dedicated Professionals", + description: + "Get to know our team of dedicated professionals committed to delivering excellence.", + openGraph: { + title: "Meet Our Team | Dedicated Professionals", + description: + "Get to know our team of dedicated professionals committed to delivering excellence.", + }, }; -export default Team; + +export default function TeamPage() { + return ; +} diff --git a/src/app/api/v1/addTeamMember/route.ts b/src/app/api/v1/addTeamMember/route.ts new file mode 100644 index 0000000..9da68af --- /dev/null +++ b/src/app/api/v1/addTeamMember/route.ts @@ -0,0 +1,83 @@ +import { NextRequest, NextResponse } from "next/server"; +import jwt from "jsonwebtoken"; +import moment from "moment-timezone"; +import TeamMember from "../../../../model/TeamMember"; +import dbConnect from "../../../../lib/dbConnect"; + +export interface ITeamMember extends Document { + name: string; + designation: string; + email: string; + linkedin?: string; + image?: string; + createdAt: Date; + updatedAt: Date; +} + +export async function POST(req: NextRequest) { + await dbConnect(); + + if (req.method !== "POST") { + return NextResponse.json( + { message: `Method ${req.method} Not Allowed` }, + { status: 405 }, + ); + } + + const token = req.cookies.get("signInToken")?.value || ""; + + if (!token) { + return NextResponse.json( + { message: "Unauthorized: No token provided" }, + { status: 401 }, + ); + } + + try { + const decoded = await jwt.verify(token, process.env.JWT_TOKEN_SECRET); + + if (decoded.role !== "admin") { + return NextResponse.json( + { message: "Forbidden: Admin access required" }, + { status: 403 }, + ); + } + + try { + const { name, designation, email, linkedin, image } = await req.json(); + + if (!name || !designation || !email) { + return NextResponse.json( + { message: "The fields (name,email,designation) are required" }, + { status: 400 }, + ); + } + + const teamMember: ITeamMember = await TeamMember.create({ + name, + image, + designation, + email, + linkedin, + createdAt: moment().tz("Asia/Kolkata").format(), + updatedAt: moment().tz("Asia/Kolkata").format(), + }); + + return NextResponse.json( + { message: "Team member added successfully", teamMember }, + { status: 201 }, + ); + } catch (err) { + console.error(err); + return NextResponse.json( + { message: "Internal Server Error" }, + { status: 500 }, + ); + } + } catch (err) { + return NextResponse.json( + { message: "Invalid Authorization token" }, + { status: 401 }, + ); + } +} diff --git a/src/app/api/v1/editTeamMember/[memberId]/route.ts b/src/app/api/v1/editTeamMember/[memberId]/route.ts new file mode 100644 index 0000000..ec4e9d8 --- /dev/null +++ b/src/app/api/v1/editTeamMember/[memberId]/route.ts @@ -0,0 +1,68 @@ +import { NextRequest, NextResponse } from "next/server"; +import jwt from "jsonwebtoken"; +import moment from "moment-timezone"; +import TeamMember from "../../../../../model/TeamMember"; +import dbConnect from "../../../../../lib/dbConnect"; + +export async function PUT(req: NextRequest) { + await dbConnect(); + + if (req.method !== "PUT") { + return NextResponse.json( + { message: `Method ${req.method} Not Allowed` }, + { status: 405 }, + ); + } + + const memberId = req.nextUrl.pathname.split("/").slice(-1)[0]; + + const token = req.cookies.get("signInToken")?.value || ""; + + if (!token) { + return NextResponse.json( + { message: "Unauthorized: No token provided" }, + { status: 401 }, + ); + } + + try { + const decoded = jwt.verify(token, process.env.JWT_TOKEN_SECRET); + + if (decoded.role !== "admin") { + return NextResponse.json( + { message: "Forbidden: Admin access required" }, + { status: 403 }, + ); + } + + const { name, designation, email, linkedin, image } = await req.json(); + + const teamMember = await TeamMember.findOne({ memberId }); + + if (!teamMember) { + return NextResponse.json( + { message: "Team member not found" }, + { status: 404 }, + ); + } + + teamMember.name = name || teamMember.name; + teamMember.image = image || teamMember.image; + teamMember.designation = designation || teamMember.designation; + teamMember.email = email || teamMember.email; + teamMember.linkedin = linkedin || teamMember.linkedin; + teamMember.updatedAt = moment().tz("Asia/Kolkata").format(); + + await teamMember.save(); + + return NextResponse.json( + { message: "Team member updated successfully", teamMember }, + { status: 200 }, + ); + } catch (err) { + return NextResponse.json( + { message: "Internal Server Error" }, + { status: 401 }, + ); + } +} diff --git a/src/app/api/v1/getAllTeamMembers/route.ts b/src/app/api/v1/getAllTeamMembers/route.ts new file mode 100644 index 0000000..d04b1aa --- /dev/null +++ b/src/app/api/v1/getAllTeamMembers/route.ts @@ -0,0 +1,49 @@ +import { NextRequest, NextResponse } from "next/server"; +import TeamMember from "../../../../model/TeamMember"; +import dbConnect from "../../../../lib/dbConnect"; + +export async function GET(req: NextRequest) { + await dbConnect(); + + if (req.method !== "GET") { + return NextResponse.json( + { message: `Method ${req.method} Not Allowed` }, + { status: 405 }, + ); + } + + // const token = req.cookies.get("signInToken")?.value || ""; + + // if (!token) { + // return NextResponse.json( + // { message: "Unauthorized: No token provided" }, + // { status: 401 }, + // ); + // } + + // try { + // const decoded = jwt.verify(token, process.env.JWT_TOKEN_SECRET); + + // if (decoded.role !== "admin") { + // return NextResponse.json( + // { message: "Forbidden: Admin access required" }, + // { status: 403 }, + // ); + // } + // Not required for now because client can also view team members through team member page + + try { + const teamMembers = await TeamMember.find(); + + return NextResponse.json( + { message: "Team members fetched successfully", teamMembers }, + { status: 200 }, + ); + } catch (err) { + console.error(err); + return NextResponse.json( + { message: "Internal Server Error" }, + { status: 500 }, + ); + } +} diff --git a/src/app/api/v1/removeTeamMember/[memberId]/route.ts b/src/app/api/v1/removeTeamMember/[memberId]/route.ts new file mode 100644 index 0000000..7aedd24 --- /dev/null +++ b/src/app/api/v1/removeTeamMember/[memberId]/route.ts @@ -0,0 +1,58 @@ +import { NextRequest, NextResponse } from "next/server"; +import jwt from "jsonwebtoken"; +import TeamMember from "../../../../../model/TeamMember"; +import dbConnect from "../../../../../lib/dbConnect"; + +export async function DELETE(req: NextRequest) { + await dbConnect(); + + if (req.method !== "DELETE") { + return NextResponse.json( + { message: `Method ${req.method} Not Allowed` }, + { status: 405 }, + ); + } + + const memberId = req.nextUrl.pathname.split("/").slice(-1)[0]; + + const token = req.cookies.get("signInToken")?.value || ""; + + if (!token) { + return NextResponse.json( + { message: "Unauthorized: No token provided" }, + { status: 401 }, + ); + } + + try { + const decoded = jwt.verify(token, process.env.JWT_TOKEN_SECRET); + + if (decoded.role !== "admin") { + return NextResponse.json( + { message: "Forbidden: Admin access required" }, + { status: 403 }, + ); + } + + const teamMember = await TeamMember.findOne({ memberId }); + + if (!teamMember) { + return NextResponse.json( + { message: "Team member not found" }, + { status: 404 }, + ); + } + + await TeamMember.deleteOne({ memberId }); + + return NextResponse.json( + { message: "Team member removed successfully" }, + { status: 200 }, + ); + } catch (err) { + return NextResponse.json( + { message: "Internal Server Error" }, + { status: 500 }, + ); + } +} diff --git a/src/app/api/v1/signIn/route.ts b/src/app/api/v1/signIn/route.ts index ec16fc6..5e9fbac 100644 --- a/src/app/api/v1/signIn/route.ts +++ b/src/app/api/v1/signIn/route.ts @@ -31,6 +31,7 @@ export async function POST(req: NextRequest) { id: user._id, username: user.username, email: user.email, + role: user.role, }; const token = await jwt.sign(tokenData, process.env.JWT_TOKEN_SECRET, { expiresIn: "12h", diff --git a/src/app/globals.scss b/src/app/globals.scss index a2b2295..613d5e3 100644 --- a/src/app/globals.scss +++ b/src/app/globals.scss @@ -2,13 +2,11 @@ @tailwind components; @tailwind utilities; - body { height: 100%; margin: 0; /* Remove any default margin */ padding: 0; /* Remove any default padding */ overflow-x: hidden; /* Prevent horizontal scrolling */ - } @font-face { diff --git a/src/app/layout.js b/src/app/layout.js index 308338a..443bed2 100644 --- a/src/app/layout.js +++ b/src/app/layout.js @@ -5,7 +5,8 @@ import "./globals.scss"; export const metadata = { title: "Currenci", - description: "Currenci is a cutting-edge financial company providing innovative solutions to help you manage, grow, and optimize your finances.", + description: + "Currenci is a cutting-edge financial company providing innovative solutions to help you manage, grow, and optimize your finances.", }; export default function RootLayout({ children }) { diff --git a/src/app/page.js b/src/app/page.js index 157e8bb..e54760b 100644 --- a/src/app/page.js +++ b/src/app/page.js @@ -1,5 +1,3 @@ -"use client"; - export default function Home() { return (
diff --git a/src/model/TeamMember.ts b/src/model/TeamMember.ts new file mode 100644 index 0000000..440fa67 --- /dev/null +++ b/src/model/TeamMember.ts @@ -0,0 +1,50 @@ +import mongoose, { Document, Schema } from "mongoose"; +import { v4 as uuidv4 } from "uuid"; + +export interface ITeamMember extends Document { + memberId: string; + name: string; + image?: string; + designation: string; + email: string; + linkedin?: string; + createdAt: Date; + updatedAt: Date; +} + +const TeamMemberSchema: Schema = new Schema({ + memberId: { + type: String, + unique: true, + default: uuidv4, + }, + name: { + type: String, + required: true, + }, + image: { + type: String, + }, + designation: { + type: String, + required: true, + }, + email: { + type: String, + required: true, + }, + linkedin: { + type: String, + }, + createdAt: { + type: Date, + required: true, + }, + updatedAt: { + type: Date, + required: true, + }, +}); + +export default mongoose.models.TeamMember || + mongoose.model("TeamMember", TeamMemberSchema); diff --git a/tsconfig.json b/tsconfig.json index f587663..22c45e3 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,7 +24,7 @@ ".next/types/**/*.ts", "**/*.ts", "**/*.tsx", - "src/app/(pages)/team/page.jsx" + "src/app/(pages)/team/TeamMember.jsx" ], "exclude": ["node_modules"] }