From 8c295eeb209de2680c0aa140d5f9e35a1983a4c1 Mon Sep 17 00:00:00 2001 From: upadsamay387 <56898833+upadsamay387@users.noreply.github.com> Date: Fri, 21 Feb 2025 16:52:40 -0600 Subject: [PATCH 1/3] Fixed all existing type errors --- .idea/dataSources.xml | 8 ++++ .../nextjs/src/app/_components/IconList.tsx | 4 +- .../src/app/_components/WindowContainer.tsx | 4 +- .../src/app/_components/auth/login_button.tsx | 1 + .../src/app/_components/genericCombobox.tsx | 2 +- .../_components/organizer/vetting-table.tsx | 2 +- .../apps/nextjs/src/app/apply/actions.tsx | 6 ++- .../application-data/countries.json | 0 .../application-data/schools.json | 0 .../application}/application-form.tsx | 17 +++---- .../nextjs/src/app/apply/application/page.tsx | 2 +- my-turborepo/apps/team-website/.prettierrc | 3 -- my-turborepo/packages/auth/env.js | 21 +++++++++ my-turborepo/packages/auth/src/config.js | 45 +++++++++++++++++++ my-turborepo/packages/auth/src/index.js | 11 +++++ my-turborepo/packages/auth/src/index.rsc.js | 17 +++++++ my-turborepo/pnpm-lock.yaml | 3 ++ 17 files changed, 129 insertions(+), 17 deletions(-) rename my-turborepo/apps/nextjs/src/app/{_components => apply/application}/application-data/countries.json (100%) rename my-turborepo/apps/nextjs/src/app/{_components => apply/application}/application-data/schools.json (100%) rename my-turborepo/apps/nextjs/src/app/{_components => apply/application}/application-form.tsx (98%) delete mode 100644 my-turborepo/apps/team-website/.prettierrc create mode 100644 my-turborepo/packages/auth/env.js create mode 100644 my-turborepo/packages/auth/src/config.js create mode 100644 my-turborepo/packages/auth/src/index.js create mode 100644 my-turborepo/packages/auth/src/index.rsc.js diff --git a/.idea/dataSources.xml b/.idea/dataSources.xml index 630b00b4..712cc9c6 100644 --- a/.idea/dataSources.xml +++ b/.idea/dataSources.xml @@ -9,5 +9,13 @@ postgres://default:Qe61TYpVcmwz@ep-nameless-flower-a44hkadf.us-east-1.aws.neon.tech:5432/verceldb?sslmode=require $ProjectFileDir$ + + postgresql + true + true + org.postgresql.Driver + jdbc:postgresql://neondb_owner:npg_XV9D4BeKzJUZ@ep-withered-sun-aao9os4f-pooler.westus3.azure.neon.tech/neondb?sslmode=require + $ProjectFileDir$ + \ No newline at end of file diff --git a/my-turborepo/apps/nextjs/src/app/_components/IconList.tsx b/my-turborepo/apps/nextjs/src/app/_components/IconList.tsx index b6d9bd1b..8359588e 100644 --- a/my-turborepo/apps/nextjs/src/app/_components/IconList.tsx +++ b/my-turborepo/apps/nextjs/src/app/_components/IconList.tsx @@ -23,7 +23,7 @@ interface IconListProps { prizeFunc?: (isOpen: boolean) => void; scheduleFunc?: () => void; helpQueueFunc?: () => void; - setFocus: (focus: string) => void; + setFocus?: (focus: string) => void; challengesFunc?: () => void; } @@ -51,6 +51,8 @@ const IconList: React.FC = ({ setFocus, }) => { const router = useRouter(); + + setFocus = setFocus ?? (() => {}); return ( // className='absolute top-0 grid grid-cols-2 pt-4 gap-1'
diff --git a/my-turborepo/apps/nextjs/src/app/_components/WindowContainer.tsx b/my-turborepo/apps/nextjs/src/app/_components/WindowContainer.tsx index b2376427..3aded43a 100644 --- a/my-turborepo/apps/nextjs/src/app/_components/WindowContainer.tsx +++ b/my-turborepo/apps/nextjs/src/app/_components/WindowContainer.tsx @@ -13,7 +13,7 @@ import { ExitButton, Lines, TAMUy2k, TitleText } from "./preregistration-form"; interface WindowContainerProps { children: React.ReactNode; isOpen?: boolean; - openFunc: (isOpen: boolean) => void; + openFunc?: (isOpen: boolean) => void; borderGradientStart?: string; borderGradientMiddle?: string; borderGradientEnd?: string; @@ -31,6 +31,8 @@ const WindowContainer: React.FC = ({ backgroundImage: `linear-gradient(to bottom, ${borderGradientStart}, ${borderGradientMiddle}, ${borderGradientEnd})`, }; + openFunc = openFunc ?? (() => {}); + return ( isOpen && (
[] = [ ); }, cell: ({ row }) => { - const createdAt = row.getValue("createdAt"); + const createdAt: Date = row.getValue("createdAt"); return
{createdAt.toLocaleDateString()}
; }, enableHiding: true, diff --git a/my-turborepo/apps/nextjs/src/app/apply/actions.tsx b/my-turborepo/apps/nextjs/src/app/apply/actions.tsx index d4023a91..cdeb437f 100644 --- a/my-turborepo/apps/nextjs/src/app/apply/actions.tsx +++ b/my-turborepo/apps/nextjs/src/app/apply/actions.tsx @@ -11,7 +11,11 @@ export async function ResumeForm() { return blob; } return ( -
+ { + uploadResume(formData); + }} + > diff --git a/my-turborepo/apps/nextjs/src/app/_components/application-data/countries.json b/my-turborepo/apps/nextjs/src/app/apply/application/application-data/countries.json similarity index 100% rename from my-turborepo/apps/nextjs/src/app/_components/application-data/countries.json rename to my-turborepo/apps/nextjs/src/app/apply/application/application-data/countries.json diff --git a/my-turborepo/apps/nextjs/src/app/_components/application-data/schools.json b/my-turborepo/apps/nextjs/src/app/apply/application/application-data/schools.json similarity index 100% rename from my-turborepo/apps/nextjs/src/app/_components/application-data/schools.json rename to my-turborepo/apps/nextjs/src/app/apply/application/application-data/schools.json diff --git a/my-turborepo/apps/nextjs/src/app/_components/application-form.tsx b/my-turborepo/apps/nextjs/src/app/apply/application/application-form.tsx similarity index 98% rename from my-turborepo/apps/nextjs/src/app/_components/application-form.tsx rename to my-turborepo/apps/nextjs/src/app/apply/application/application-form.tsx index 36581413..432fdad4 100644 --- a/my-turborepo/apps/nextjs/src/app/_components/application-form.tsx +++ b/my-turborepo/apps/nextjs/src/app/apply/application/application-form.tsx @@ -1,6 +1,6 @@ "use client"; -import "./customCss.scss"; +import "../../_components/customCss.scss"; import type { SubmitHandler } from "react-hook-form"; import React, { useState } from "react"; @@ -19,7 +19,9 @@ import { FormMessage, } from "@vanni/ui/form"; -import type { ApplicationSchema } from "../apply/validation"; +import type { ApplicationSchema } from "../validation"; +import schools from "~/app/apply/application/application-data/schools.json"; +import schoolsJson from "~/app/apply/application/application-data/schools.json"; import { Button } from "~/components/ui/button"; import { Checkbox } from "~/components/ui/checkbox"; import { Input } from "~/components/ui/input"; @@ -38,12 +40,10 @@ import { SHIRT_SIZES, } from "~/lib/dropdownOptions"; import { api } from "~/trpc/react"; -import { applicationSchema } from "../apply/validation"; -import schools from "./application-data/schools.json"; -import schoolsJson from "./application-data/schools.json"; -import GenericCombobox from "./genericCombobox"; -import LoadingAnimation from "./loadingAnimation"; -import Title from "./title"; +import GenericCombobox from "../../_components/genericCombobox"; +import LoadingAnimation from "../../_components/loadingAnimation"; +import Title from "../../_components/title"; +import { applicationSchema } from "../validation"; // Map schools to DropdownOption type const SCHOOL_OPTIONS = schools.map((school) => ({ @@ -745,6 +745,7 @@ export function ApplicationForm() { field.onChange(e); setDietaryRestrictionCount(e.target.value.length); }} + value={field.value ?? ""} /> diff --git a/my-turborepo/apps/nextjs/src/app/apply/application/page.tsx b/my-turborepo/apps/nextjs/src/app/apply/application/page.tsx index 2c07e8a7..e3a8971f 100644 --- a/my-turborepo/apps/nextjs/src/app/apply/application/page.tsx +++ b/my-turborepo/apps/nextjs/src/app/apply/application/page.tsx @@ -3,7 +3,7 @@ import { Suspense } from "react"; import { redirect } from "next/navigation"; -import { ApplicationForm } from "~/app/_components/application-form"; +import { ApplicationForm } from "~/app/apply/application/application-form"; // TODO: Replace this variable with an api route that checks the latest event const appsOpen = false; diff --git a/my-turborepo/apps/team-website/.prettierrc b/my-turborepo/apps/team-website/.prettierrc deleted file mode 100644 index b4bfed35..00000000 --- a/my-turborepo/apps/team-website/.prettierrc +++ /dev/null @@ -1,3 +0,0 @@ -{ - "plugins": ["prettier-plugin-tailwindcss"] -} diff --git a/my-turborepo/packages/auth/env.js b/my-turborepo/packages/auth/env.js new file mode 100644 index 00000000..3b58e0df --- /dev/null +++ b/my-turborepo/packages/auth/env.js @@ -0,0 +1,21 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.env = void 0; +/* eslint-disable no-restricted-properties */ +var env_nextjs_1 = require("@t3-oss/env-nextjs"); +var zod_1 = require("zod"); +exports.env = (0, env_nextjs_1.createEnv)({ + server: { + AUTH_DISCORD_ID: zod_1.z.string().min(1), + AUTH_DISCORD_SECRET: zod_1.z.string().min(1), + AUTH_AUTH0_ID: zod_1.z.string().min(1), + AUTH_AUTH0_SECRET: zod_1.z.string().min(1), + AUTH_AUTH0_DOMAIN: zod_1.z.string().url(), + AUTH_SECRET: process.env.NODE_ENV === "production" + ? zod_1.z.string().min(1) + : zod_1.z.string().min(1).optional(), + }, + client: {}, + experimental__runtimeEnv: {}, + skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION, +}); diff --git a/my-turborepo/packages/auth/src/config.js b/my-turborepo/packages/auth/src/config.js new file mode 100644 index 00000000..5c9448ef --- /dev/null +++ b/my-turborepo/packages/auth/src/config.js @@ -0,0 +1,45 @@ +"use strict"; +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.authConfig = void 0; +var drizzle_adapter_1 = require("@auth/drizzle-adapter"); +var auth0_1 = require("next-auth/providers/auth0"); +var discord_1 = require("next-auth/providers/discord"); +var client_1 = require("@vanni/db/client"); +var schema_1 = require("@vanni/db/schema"); +var env_1 = require("../env"); +exports.authConfig = { + adapter: (0, drizzle_adapter_1.DrizzleAdapter)(client_1.db, { + usersTable: schema_1.User, + accountsTable: schema_1.Account, + sessionsTable: schema_1.Session, + }), + providers: [ + discord_1.default, + (0, auth0_1.default)({ + clientId: env_1.env.AUTH_AUTH0_ID, + clientSecret: env_1.env.AUTH_AUTH0_SECRET, + issuer: env_1.env.AUTH_AUTH0_DOMAIN, + }), + ], + pages: { + signIn: "/login", + }, + callbacks: { + session: function (opts) { + if (!("user" in opts)) + throw "unreachable with session strategy"; + return __assign(__assign({}, opts.session), { user: __assign(__assign({}, opts.session.user), { id: opts.user.id }) }); + }, + }, +}; diff --git a/my-turborepo/packages/auth/src/index.js b/my-turborepo/packages/auth/src/index.js new file mode 100644 index 00000000..ed611769 --- /dev/null +++ b/my-turborepo/packages/auth/src/index.js @@ -0,0 +1,11 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.signOut = exports.signIn = exports.auth = exports.POST = exports.GET = void 0; +var next_auth_1 = require("next-auth"); +var config_1 = require("./config"); +var _a = (0, next_auth_1.default)(config_1.authConfig), _b = _a.handlers, GET = _b.GET, POST = _b.POST, auth = _a.auth, signIn = _a.signIn, signOut = _a.signOut; +exports.GET = GET; +exports.POST = POST; +exports.auth = auth; +exports.signIn = signIn; +exports.signOut = signOut; diff --git a/my-turborepo/packages/auth/src/index.rsc.js b/my-turborepo/packages/auth/src/index.rsc.js new file mode 100644 index 00000000..9d05f666 --- /dev/null +++ b/my-turborepo/packages/auth/src/index.rsc.js @@ -0,0 +1,17 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.signOut = exports.signIn = exports.auth = exports.POST = exports.GET = void 0; +var react_1 = require("react"); +var next_auth_1 = require("next-auth"); +var config_1 = require("./config"); +var _a = (0, next_auth_1.default)(config_1.authConfig), _b = _a.handlers, GET = _b.GET, POST = _b.POST, defaultAuth = _a.auth, signIn = _a.signIn, signOut = _a.signOut; +exports.GET = GET; +exports.POST = POST; +exports.signIn = signIn; +exports.signOut = signOut; +/** + * This is the main way to get session data for your RSCs. + * This will de-duplicate all calls to next-auth's default `auth()` function and only call it once per request + */ +var auth = (0, react_1.cache)(defaultAuth); +exports.auth = auth; diff --git a/my-turborepo/pnpm-lock.yaml b/my-turborepo/pnpm-lock.yaml index 1f95bfa4..23356d56 100644 --- a/my-turborepo/pnpm-lock.yaml +++ b/my-turborepo/pnpm-lock.yaml @@ -389,6 +389,9 @@ importers: apps/team-website: dependencies: + '@radix-ui/react-icons': + specifier: ^1.3.0 + version: 1.3.2(react@18.3.1) '@radix-ui/react-slot': specifier: ^1.1.0 version: 1.1.2(@types/react@18.3.18)(react@18.3.1) From 797e4c32c840ee445172f6256ec1c1201cd1fd6b Mon Sep 17 00:00:00 2001 From: upadsamay387 <56898833+upadsamay387@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:19:54 -0600 Subject: [PATCH 2/3] Deleted files that were accidentally committed --- my-turborepo/packages/auth/env.js | 21 ---------- my-turborepo/packages/auth/src/config.js | 45 --------------------- my-turborepo/packages/auth/src/index.js | 11 ----- my-turborepo/packages/auth/src/index.rsc.js | 17 -------- 4 files changed, 94 deletions(-) delete mode 100644 my-turborepo/packages/auth/env.js delete mode 100644 my-turborepo/packages/auth/src/config.js delete mode 100644 my-turborepo/packages/auth/src/index.js delete mode 100644 my-turborepo/packages/auth/src/index.rsc.js diff --git a/my-turborepo/packages/auth/env.js b/my-turborepo/packages/auth/env.js deleted file mode 100644 index 3b58e0df..00000000 --- a/my-turborepo/packages/auth/env.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.env = void 0; -/* eslint-disable no-restricted-properties */ -var env_nextjs_1 = require("@t3-oss/env-nextjs"); -var zod_1 = require("zod"); -exports.env = (0, env_nextjs_1.createEnv)({ - server: { - AUTH_DISCORD_ID: zod_1.z.string().min(1), - AUTH_DISCORD_SECRET: zod_1.z.string().min(1), - AUTH_AUTH0_ID: zod_1.z.string().min(1), - AUTH_AUTH0_SECRET: zod_1.z.string().min(1), - AUTH_AUTH0_DOMAIN: zod_1.z.string().url(), - AUTH_SECRET: process.env.NODE_ENV === "production" - ? zod_1.z.string().min(1) - : zod_1.z.string().min(1).optional(), - }, - client: {}, - experimental__runtimeEnv: {}, - skipValidation: !!process.env.CI || !!process.env.SKIP_ENV_VALIDATION, -}); diff --git a/my-turborepo/packages/auth/src/config.js b/my-turborepo/packages/auth/src/config.js deleted file mode 100644 index 5c9448ef..00000000 --- a/my-turborepo/packages/auth/src/config.js +++ /dev/null @@ -1,45 +0,0 @@ -"use strict"; -var __assign = (this && this.__assign) || function () { - __assign = Object.assign || function(t) { - for (var s, i = 1, n = arguments.length; i < n; i++) { - s = arguments[i]; - for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) - t[p] = s[p]; - } - return t; - }; - return __assign.apply(this, arguments); -}; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.authConfig = void 0; -var drizzle_adapter_1 = require("@auth/drizzle-adapter"); -var auth0_1 = require("next-auth/providers/auth0"); -var discord_1 = require("next-auth/providers/discord"); -var client_1 = require("@vanni/db/client"); -var schema_1 = require("@vanni/db/schema"); -var env_1 = require("../env"); -exports.authConfig = { - adapter: (0, drizzle_adapter_1.DrizzleAdapter)(client_1.db, { - usersTable: schema_1.User, - accountsTable: schema_1.Account, - sessionsTable: schema_1.Session, - }), - providers: [ - discord_1.default, - (0, auth0_1.default)({ - clientId: env_1.env.AUTH_AUTH0_ID, - clientSecret: env_1.env.AUTH_AUTH0_SECRET, - issuer: env_1.env.AUTH_AUTH0_DOMAIN, - }), - ], - pages: { - signIn: "/login", - }, - callbacks: { - session: function (opts) { - if (!("user" in opts)) - throw "unreachable with session strategy"; - return __assign(__assign({}, opts.session), { user: __assign(__assign({}, opts.session.user), { id: opts.user.id }) }); - }, - }, -}; diff --git a/my-turborepo/packages/auth/src/index.js b/my-turborepo/packages/auth/src/index.js deleted file mode 100644 index ed611769..00000000 --- a/my-turborepo/packages/auth/src/index.js +++ /dev/null @@ -1,11 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.signOut = exports.signIn = exports.auth = exports.POST = exports.GET = void 0; -var next_auth_1 = require("next-auth"); -var config_1 = require("./config"); -var _a = (0, next_auth_1.default)(config_1.authConfig), _b = _a.handlers, GET = _b.GET, POST = _b.POST, auth = _a.auth, signIn = _a.signIn, signOut = _a.signOut; -exports.GET = GET; -exports.POST = POST; -exports.auth = auth; -exports.signIn = signIn; -exports.signOut = signOut; diff --git a/my-turborepo/packages/auth/src/index.rsc.js b/my-turborepo/packages/auth/src/index.rsc.js deleted file mode 100644 index 9d05f666..00000000 --- a/my-turborepo/packages/auth/src/index.rsc.js +++ /dev/null @@ -1,17 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.signOut = exports.signIn = exports.auth = exports.POST = exports.GET = void 0; -var react_1 = require("react"); -var next_auth_1 = require("next-auth"); -var config_1 = require("./config"); -var _a = (0, next_auth_1.default)(config_1.authConfig), _b = _a.handlers, GET = _b.GET, POST = _b.POST, defaultAuth = _a.auth, signIn = _a.signIn, signOut = _a.signOut; -exports.GET = GET; -exports.POST = POST; -exports.signIn = signIn; -exports.signOut = signOut; -/** - * This is the main way to get session data for your RSCs. - * This will de-duplicate all calls to next-auth's default `auth()` function and only call it once per request - */ -var auth = (0, react_1.cache)(defaultAuth); -exports.auth = auth; From d25a224b1ac54f8de63370b56b534b9b465595d8 Mon Sep 17 00:00:00 2001 From: upadsamay387 <56898833+upadsamay387@users.noreply.github.com> Date: Fri, 21 Feb 2025 17:38:59 -0600 Subject: [PATCH 3/3] Edited ESLint rules and fixed debounce.ts --- .../apps/nextjs/src/components/ui/debounce.ts | 2 +- my-turborepo/apps/team-website/package.json | 1 + .../apps/team-website/src/app/blog/page.tsx | 2 +- my-turborepo/apps/team-website/src/app/page.tsx | 2 +- .../src/components/AboutTeam/teams.tsx | 3 ++- .../src/components/Blog/SingleBlog.tsx | 2 +- .../team-website/src/components/Blog/blogData.tsx | 2 +- .../src/components/Common/ScrollUp.tsx | 2 +- .../src/components/Header/menuData.tsx | 2 +- .../team-website/src/components/error/page.tsx | 2 +- .../team-website/src/components/signin/page.tsx | 2 +- .../team-website/src/components/signup/page.tsx | 2 +- .../team-website/src/components/ui/button.tsx | 3 ++- .../team-website/src/components/ui/carousel.tsx | 15 +++++++-------- .../apps/team-website/src/hooks/use-toast.ts | 2 +- my-turborepo/apps/team-website/src/lib/utils.ts | 3 ++- my-turborepo/apps/team-website/src/types/blog.ts | 8 ++++---- my-turborepo/apps/team-website/src/types/brand.ts | 4 ++-- .../apps/team-website/src/types/feature.ts | 4 ++-- my-turborepo/apps/team-website/src/types/menu.ts | 4 ++-- .../apps/team-website/src/types/testimonial.ts | 4 ++-- my-turborepo/tooling/eslint/base.js | 2 +- 22 files changed, 38 insertions(+), 35 deletions(-) diff --git a/my-turborepo/apps/nextjs/src/components/ui/debounce.ts b/my-turborepo/apps/nextjs/src/components/ui/debounce.ts index d98da36f..48aa5575 100644 --- a/my-turborepo/apps/nextjs/src/components/ui/debounce.ts +++ b/my-turborepo/apps/nextjs/src/components/ui/debounce.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from "react"; -export default function useDebounce(value: any, delay: number) { +export default function useDebounce(value: T, delay: number) { const [debouncedValue, setDebouncedValue] = useState(value); const [isDebouncing, setIsDebouncing] = useState(false); diff --git a/my-turborepo/apps/team-website/package.json b/my-turborepo/apps/team-website/package.json index b861c8df..eebfb9e3 100644 --- a/my-turborepo/apps/team-website/package.json +++ b/my-turborepo/apps/team-website/package.json @@ -2,6 +2,7 @@ "name": "@vanni/team-website", "version": "2.0.0", "private": true, + "type": "module", "scripts": { "build": "pnpm with-env next build", "clean": "git clean -xdf .next .turbo node_modules", diff --git a/my-turborepo/apps/team-website/src/app/blog/page.tsx b/my-turborepo/apps/team-website/src/app/blog/page.tsx index e14b710f..32c0b6a7 100644 --- a/my-turborepo/apps/team-website/src/app/blog/page.tsx +++ b/my-turborepo/apps/team-website/src/app/blog/page.tsx @@ -1,4 +1,4 @@ -import React from 'react'; +import type React from 'react'; const BlogPage: React.FC = () => { return null; diff --git a/my-turborepo/apps/team-website/src/app/page.tsx b/my-turborepo/apps/team-website/src/app/page.tsx index 7deabf84..27264f5e 100644 --- a/my-turborepo/apps/team-website/src/app/page.tsx +++ b/my-turborepo/apps/team-website/src/app/page.tsx @@ -6,7 +6,7 @@ import ScrollUp from "@/components/Common/ScrollUp"; import Contact from "@/components/Contact"; import Hero from "@/components/Hero"; import Video from "@/components/Video"; -import { Metadata } from "next"; +import type { Metadata } from "next"; import AboutTeam from "../components/AboutTeam/AboutTeam"; import ContactBackground from "../components/Contact/ContactBackground"; import { Suspense } from "react"; diff --git a/my-turborepo/apps/team-website/src/components/AboutTeam/teams.tsx b/my-turborepo/apps/team-website/src/components/AboutTeam/teams.tsx index c6f56d05..e996d907 100644 --- a/my-turborepo/apps/team-website/src/components/AboutTeam/teams.tsx +++ b/my-turborepo/apps/team-website/src/components/AboutTeam/teams.tsx @@ -1,4 +1,5 @@ -import TeamMember, { TeamMemberProps } from "./teamMember"; +import type { TeamMemberProps } from "./teamMember"; +import TeamMember from "./teamMember"; interface TeamsProps { teamMembers: TeamMemberProps[]; diff --git a/my-turborepo/apps/team-website/src/components/Blog/SingleBlog.tsx b/my-turborepo/apps/team-website/src/components/Blog/SingleBlog.tsx index f13b2557..98121f6c 100644 --- a/my-turborepo/apps/team-website/src/components/Blog/SingleBlog.tsx +++ b/my-turborepo/apps/team-website/src/components/Blog/SingleBlog.tsx @@ -1,4 +1,4 @@ -import { Blog } from "@/types/blog"; +import type { Blog } from "@/types/blog"; import Image from "next/image"; import Link from "next/link"; diff --git a/my-turborepo/apps/team-website/src/components/Blog/blogData.tsx b/my-turborepo/apps/team-website/src/components/Blog/blogData.tsx index 881f1c19..a8999c0e 100644 --- a/my-turborepo/apps/team-website/src/components/Blog/blogData.tsx +++ b/my-turborepo/apps/team-website/src/components/Blog/blogData.tsx @@ -1,4 +1,4 @@ -import { Blog } from "@/types/blog"; +import type { Blog } from "@/types/blog"; const blogData: Blog[] = [ { diff --git a/my-turborepo/apps/team-website/src/components/Common/ScrollUp.tsx b/my-turborepo/apps/team-website/src/components/Common/ScrollUp.tsx index 101d294e..e9c98df1 100644 --- a/my-turborepo/apps/team-website/src/components/Common/ScrollUp.tsx +++ b/my-turborepo/apps/team-website/src/components/Common/ScrollUp.tsx @@ -3,7 +3,7 @@ import { useEffect } from "react"; export default function ScrollUp() { - useEffect(() => window.document.scrollingElement?.scrollTo(0, 0), []); + useEffect(() => window.document.scrollingElement.scrollTo(0, 0), []); return null; } diff --git a/my-turborepo/apps/team-website/src/components/Header/menuData.tsx b/my-turborepo/apps/team-website/src/components/Header/menuData.tsx index f7561917..465e7962 100644 --- a/my-turborepo/apps/team-website/src/components/Header/menuData.tsx +++ b/my-turborepo/apps/team-website/src/components/Header/menuData.tsx @@ -1,4 +1,4 @@ -import { Menu } from "@/types/menu"; +import type { Menu } from "@/types/menu"; const menuData: Menu[] = [ { diff --git a/my-turborepo/apps/team-website/src/components/error/page.tsx b/my-turborepo/apps/team-website/src/components/error/page.tsx index 0d76a7b0..3ec4affd 100644 --- a/my-turborepo/apps/team-website/src/components/error/page.tsx +++ b/my-turborepo/apps/team-website/src/components/error/page.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -import { Metadata } from "next"; +import type { Metadata } from "next"; export const metadata: Metadata = { title: "Error Page | TAMU Datathon", diff --git a/my-turborepo/apps/team-website/src/components/signin/page.tsx b/my-turborepo/apps/team-website/src/components/signin/page.tsx index 179ebb28..66a7f0cc 100644 --- a/my-turborepo/apps/team-website/src/components/signin/page.tsx +++ b/my-turborepo/apps/team-website/src/components/signin/page.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -import { Metadata } from "next"; +import type { Metadata } from "next"; export const metadata: Metadata = { title: "Sign In Page | TAMU Datathon", diff --git a/my-turborepo/apps/team-website/src/components/signup/page.tsx b/my-turborepo/apps/team-website/src/components/signup/page.tsx index 0a14e261..b242e548 100644 --- a/my-turborepo/apps/team-website/src/components/signup/page.tsx +++ b/my-turborepo/apps/team-website/src/components/signup/page.tsx @@ -1,6 +1,6 @@ import Link from "next/link"; -import { Metadata } from "next"; +import type { Metadata } from "next"; export const metadata: Metadata = { title: "Sign Up Page | TAMU Datathon", diff --git a/my-turborepo/apps/team-website/src/components/ui/button.tsx b/my-turborepo/apps/team-website/src/components/ui/button.tsx index 36496a28..81db0453 100644 --- a/my-turborepo/apps/team-website/src/components/ui/button.tsx +++ b/my-turborepo/apps/team-website/src/components/ui/button.tsx @@ -1,6 +1,7 @@ import * as React from "react" import { Slot } from "@radix-ui/react-slot" -import { cva, type VariantProps } from "class-variance-authority" +import { cva } from "class-variance-authority" +import type {VariantProps} from "class-variance-authority"; import { cn } from "@/lib/utils" diff --git a/my-turborepo/apps/team-website/src/components/ui/carousel.tsx b/my-turborepo/apps/team-website/src/components/ui/carousel.tsx index ec505d00..5f9de1dd 100644 --- a/my-turborepo/apps/team-website/src/components/ui/carousel.tsx +++ b/my-turborepo/apps/team-website/src/components/ui/carousel.tsx @@ -1,9 +1,8 @@ "use client" import * as React from "react" -import useEmblaCarousel, { - type UseEmblaCarouselType, -} from "embla-carousel-react" +import useEmblaCarousel from "embla-carousel-react" +import type {UseEmblaCarouselType} from "embla-carousel-react"; import { ArrowLeft, ArrowRight } from "lucide-react" import { cn } from "@/lib/utils" @@ -14,7 +13,7 @@ type UseCarouselParameters = Parameters type CarouselOptions = UseCarouselParameters[0] type CarouselPlugin = UseCarouselParameters[1] -type CarouselProps = { +interface CarouselProps { opts?: CarouselOptions plugins?: CarouselPlugin orientation?: "horizontal" | "vertical" @@ -78,11 +77,11 @@ const Carousel = React.forwardRef< }, []) const scrollPrev = React.useCallback(() => { - api?.scrollPrev() + api.scrollPrev() }, [api]) const scrollNext = React.useCallback(() => { - api?.scrollNext() + api.scrollNext() }, [api]) const handleKeyDown = React.useCallback( @@ -116,7 +115,7 @@ const Carousel = React.forwardRef< api.on("select", onSelect) return () => { - api?.off("select", onSelect) + api.off("select", onSelect) } }, [api, onSelect]) @@ -127,7 +126,7 @@ const Carousel = React.forwardRef< api: api, opts, orientation: - orientation || (opts?.axis === "y" ? "vertical" : "horizontal"), + orientation || (opts.axis === "y" ? "vertical" : "horizontal"), scrollPrev, scrollNext, canScrollPrev, diff --git a/my-turborepo/apps/team-website/src/hooks/use-toast.ts b/my-turborepo/apps/team-website/src/hooks/use-toast.ts index 02e111d8..7d550de2 100644 --- a/my-turborepo/apps/team-website/src/hooks/use-toast.ts +++ b/my-turborepo/apps/team-website/src/hooks/use-toast.ts @@ -129,7 +129,7 @@ export const reducer = (state: State, action: Action): State => { } } -const listeners: Array<(state: State) => void> = [] +const listeners: ((state: State) => void)[] = [] let memoryState: State = { toasts: [] } diff --git a/my-turborepo/apps/team-website/src/lib/utils.ts b/my-turborepo/apps/team-website/src/lib/utils.ts index bd0c391d..e1944ec5 100644 --- a/my-turborepo/apps/team-website/src/lib/utils.ts +++ b/my-turborepo/apps/team-website/src/lib/utils.ts @@ -1,4 +1,5 @@ -import { clsx, type ClassValue } from "clsx" +import { clsx } from "clsx" +import type {ClassValue} from "clsx"; import { twMerge } from "tailwind-merge" export function cn(...inputs: ClassValue[]) { diff --git a/my-turborepo/apps/team-website/src/types/blog.ts b/my-turborepo/apps/team-website/src/types/blog.ts index 520b8983..05ed375b 100644 --- a/my-turborepo/apps/team-website/src/types/blog.ts +++ b/my-turborepo/apps/team-website/src/types/blog.ts @@ -1,10 +1,10 @@ -type Author = { +interface Author { name: string; image: string; designation: string; -}; +} -export type Blog = { +export interface Blog { id: number; title: string; paragraph: string; @@ -12,4 +12,4 @@ export type Blog = { author: Author; tags: string[]; publishDate: string; -}; +} diff --git a/my-turborepo/apps/team-website/src/types/brand.ts b/my-turborepo/apps/team-website/src/types/brand.ts index ea504f0f..42a910a8 100644 --- a/my-turborepo/apps/team-website/src/types/brand.ts +++ b/my-turborepo/apps/team-website/src/types/brand.ts @@ -1,7 +1,7 @@ -export type Brand = { +export interface Brand { id: number; name: string; href: string; image: string; imageLight?: string; -}; +} diff --git a/my-turborepo/apps/team-website/src/types/feature.ts b/my-turborepo/apps/team-website/src/types/feature.ts index 83ed2485..8d7ac3e7 100644 --- a/my-turborepo/apps/team-website/src/types/feature.ts +++ b/my-turborepo/apps/team-website/src/types/feature.ts @@ -1,6 +1,6 @@ -export type Feature = { +export interface Feature { id: number; icon: JSX.Element; title: string; paragraph: string; -}; +} diff --git a/my-turborepo/apps/team-website/src/types/menu.ts b/my-turborepo/apps/team-website/src/types/menu.ts index 28adb37b..9d0bbd51 100644 --- a/my-turborepo/apps/team-website/src/types/menu.ts +++ b/my-turborepo/apps/team-website/src/types/menu.ts @@ -1,7 +1,7 @@ -export type Menu = { +export interface Menu { id: number; title: string; path?: string; newTab: boolean; submenu?: Menu[]; -}; +} diff --git a/my-turborepo/apps/team-website/src/types/testimonial.ts b/my-turborepo/apps/team-website/src/types/testimonial.ts index be93e097..44182fb3 100644 --- a/my-turborepo/apps/team-website/src/types/testimonial.ts +++ b/my-turborepo/apps/team-website/src/types/testimonial.ts @@ -1,8 +1,8 @@ -export type Testimonial = { +export interface Testimonial { id: number; name: string; designation: string; content: string; image: string; star: number; -}; +} diff --git a/my-turborepo/tooling/eslint/base.js b/my-turborepo/tooling/eslint/base.js index 6f7da6d2..ba91f4d4 100644 --- a/my-turborepo/tooling/eslint/base.js +++ b/my-turborepo/tooling/eslint/base.js @@ -49,7 +49,7 @@ export default tseslint.config( ], rules: { "@typescript-eslint/no-unused-vars": [ - "error", + "warn", { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, ], "@typescript-eslint/consistent-type-imports": [