From d6a4aef8bf8a769cab571d4bc5d581995652a5e2 Mon Sep 17 00:00:00 2001 From: MdAnas <144697531+Anas-github-acc@users.noreply.github.com> Date: Thu, 22 Aug 2024 10:36:56 +0530 Subject: [PATCH] adding member pageNew (#110) * manading form_create from falling down and allowing user to create table if their no entries for them in users table * little debugging * debug * adding home page * adding update password * debugging * correcting login page * debugged login page * correcting sinup page * Delete .github/workflows directory * correcting signup page - 3 * correcting signup page 4 * Delete .github/workflows directory 2 * correcting sinup page 5 * members page * adding member page --------- Co-authored-by: Devyash Saini <59441567+thedevyashsaini@users.noreply.github.com> --- .gitignore | 9 + next-sitemap.config.js | 4 + next.config.mjs | 6 +- package-lock.json | 140 +++- package.json | 5 + public/members/placeholder.jpeg | Bin 0 -> 5514 bytes public/sitemap.xml | 4 + .../components/component.tsx} | 66 +- .../components/loggingout.tsx | 3 +- .../components/styles.module.css | 0 .../components/userform.tsx | 0 src/app/{form_create => account}/page.tsx | 11 +- src/app/auth/callback/route.ts | 2 +- src/app/auth/component/component.tsx | 169 ++++- src/app/auth/component/styles.module.css | 10 +- src/app/auth/confirm/route.ts | 2 +- src/app/auth/page.tsx | 2 +- src/app/auth/update_password/page.tsx | 2 +- src/app/blogwriter/page.tsx | 2 +- .../components/manSittingAtTableSvg.js | 220 +++++- .../contact_us/components/manWithLaptopSvg.js | 147 +++- src/app/contact_us/page.jsx | 661 +++++++++--------- .../event/[id]/components/checkIsAdmin.jsx | 22 +- src/app/event/[id]/components/event.jsx | 17 +- .../event/[id]/components/eventDetails.jsx | 30 +- src/app/event/[id]/page.jsx | 108 +-- src/app/events/page.jsx | 20 +- src/app/globals.css | 19 + src/app/home/components/hero-parallax.tsx | 173 +++++ src/app/home/layout.tsx | 35 +- src/app/home/page.tsx | 108 ++- src/app/members/data.json | 73 ++ src/app/{event => members}/layout.tsx | 0 src/app/members/page.tsx | 124 ++++ src/app/members/styles.css | 147 ++++ src/components/navbar.jsx | 73 +- src/components/ui/EventBox.jsx | 26 +- src/components/ui/loggingout.tsx | 46 ++ src/components/ui/switch.tsx | 29 + src/components/ui/textarea.tsx | 24 + .../user_dropdown.tsx} | 24 +- src/utils/supabase/middleware.ts | 18 +- tailwind.config.ts | 2 +- 43 files changed, 1953 insertions(+), 630 deletions(-) create mode 100644 next-sitemap.config.js create mode 100644 public/members/placeholder.jpeg create mode 100644 public/sitemap.xml rename src/app/{form_create/components/form.tsx => account/components/component.tsx} (62%) rename src/app/{form_create => account}/components/loggingout.tsx (93%) rename src/app/{form_create => account}/components/styles.module.css (100%) rename src/app/{form_create => account}/components/userform.tsx (100%) rename src/app/{form_create => account}/page.tsx (92%) create mode 100644 src/app/home/components/hero-parallax.tsx create mode 100644 src/app/members/data.json rename src/app/{event => members}/layout.tsx (100%) create mode 100644 src/app/members/page.tsx create mode 100644 src/app/members/styles.css create mode 100644 src/components/ui/loggingout.tsx create mode 100644 src/components/ui/switch.tsx create mode 100644 src/components/ui/textarea.tsx rename src/{app/form_create/components/dropdown_menu.tsx => components/user_dropdown.tsx} (82%) diff --git a/.gitignore b/.gitignore index 1437c53..0482f6c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,12 @@ yarn-error.log* # vercel .vercel + +# admin and users +/src/app/users +/src/app/admin + +# robots.txt +/robots.txt +/sitemap.xml +/sitemap-[0-9]*.xml \ No newline at end of file diff --git a/next-sitemap.config.js b/next-sitemap.config.js new file mode 100644 index 0000000..451b733 --- /dev/null +++ b/next-sitemap.config.js @@ -0,0 +1,4 @@ +module.exports = { + siteUrl: "https://iiitvcc.vercel.app", + generateRobotsTxt: true, +}; diff --git a/next.config.mjs b/next.config.mjs index 4678774..60b44f2 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -1,4 +1,8 @@ /** @type {import('next').NextConfig} */ -const nextConfig = {}; +const nextConfig = { + images: { + domains: ["aceternity.com"], + }, +}; export default nextConfig; diff --git a/package-lock.json b/package-lock.json index 90e9525..fd6c89e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.0", "@reduxjs/toolkit": "^2.2.6", "@supabase/ssr": "^0.4.0", "@vercel/analytics": "^1.3.1", @@ -25,11 +26,13 @@ "axios": "^1.7.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "framer-motion": "^11.3.29", "jodit-react": "^4.1.2", "ldrs": "^1.0.2", "lucide-react": "^0.408.0", "next": "14.2.5", "next-client-cookies": "^1.1.1", + "next-sitemap": "^4.2.3", "react": "^18", "react-dom": "^18", "react-icons": "^5.2.1", @@ -262,6 +265,12 @@ "node": ">=6.9.0" } }, + "node_modules/@corex/deepmerge": { + "version": "4.0.43", + "resolved": "https://registry.npmjs.org/@corex/deepmerge/-/deepmerge-4.0.43.tgz", + "integrity": "sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==", + "license": "MIT" + }, "node_modules/@emnapi/runtime": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.2.0.tgz", @@ -1193,7 +1202,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1209,7 +1217,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "darwin" @@ -1225,7 +1232,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1241,7 +1247,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1257,7 +1262,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1273,7 +1277,6 @@ "cpu": [ "x64" ], - "license": "MIT", "optional": true, "os": [ "linux" @@ -1289,7 +1292,6 @@ "cpu": [ "arm64" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1305,7 +1307,6 @@ "cpu": [ "ia32" ], - "license": "MIT", "optional": true, "os": [ "win32" @@ -1915,6 +1916,35 @@ } } }, + "node_modules/@radix-ui/react-switch": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@radix-ui/react-switch/-/react-switch-1.1.0.tgz", + "integrity": "sha512-OBzy5WAj641k0AOSpKQtreDMe+isX0MQJ1IVyF03ucdF3DunOnROVrjWs8zsXUxC3zfZ6JL9HFVCUlMghz9dJw==", + "license": "MIT", + "dependencies": { + "@radix-ui/primitive": "1.1.0", + "@radix-ui/react-compose-refs": "1.1.0", + "@radix-ui/react-context": "1.1.0", + "@radix-ui/react-primitive": "2.0.0", + "@radix-ui/react-use-controllable-state": "1.1.0", + "@radix-ui/react-use-previous": "1.1.0", + "@radix-ui/react-use-size": "1.1.0" + }, + "peerDependencies": { + "@types/react": "*", + "@types/react-dom": "*", + "react": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "@types/react-dom": { + "optional": true + } + } + }, "node_modules/@radix-ui/react-use-callback-ref": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@radix-ui/react-use-callback-ref/-/react-use-callback-ref-1.1.0.tgz", @@ -2062,19 +2092,6 @@ } } }, - "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.18.1", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.1.tgz", - "integrity": "sha512-7O5u/p6oKUFYjRbZkL2FLbwsyoJAjyeXHCU3O4ndvzg2OFO2GinFPSJFGbiwFDaCFc+k7gs9CF243PwdPQFh5g==", - "cpu": [ - "x64" - ], - "license": "MIT", - "optional": true, - "os": [ - "linux" - ] - }, "node_modules/@supabase/auth-js": { "version": "2.64.4", "resolved": "https://registry.npmjs.org/@supabase/auth-js/-/auth-js-2.64.4.tgz", @@ -2444,9 +2461,9 @@ } }, "node_modules/axios": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", - "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", + "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.6", @@ -3155,18 +3172,29 @@ "url": "https://github.com/sponsors/rawify" } }, - "node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "hasInstallScript": true, + "node_modules/framer-motion": { + "version": "11.3.29", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.3.29.tgz", + "integrity": "sha512-uyDuUOeOElJEA3kbkbyoTNEf75Jih1EUg0ouLKYMlGDdt/LaJPmO+FyOGAGxM2HwKhHcAoKFNveR5A8peb7yhw==", "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "@emotion/is-prop-valid": "*", + "react": "^18.0.0", + "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, "node_modules/function-bind": { @@ -3596,6 +3624,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/minipass": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.2.tgz", @@ -3731,6 +3768,39 @@ "react": ">= 16.8.0" } }, + "node_modules/next-sitemap": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/next-sitemap/-/next-sitemap-4.2.3.tgz", + "integrity": "sha512-vjdCxeDuWDzldhCnyFCQipw5bfpl4HmZA7uoo3GAaYGjGgfL4Cxb1CiztPuWGmS+auYs7/8OekRS8C2cjdAsjQ==", + "funding": [ + { + "url": "https://github.com/iamvishnusankar/next-sitemap.git" + } + ], + "license": "MIT", + "dependencies": { + "@corex/deepmerge": "^4.0.43", + "@next/env": "^13.4.3", + "fast-glob": "^3.2.12", + "minimist": "^1.2.8" + }, + "bin": { + "next-sitemap": "bin/next-sitemap.mjs", + "next-sitemap-cjs": "bin/next-sitemap.cjs" + }, + "engines": { + "node": ">=14.18" + }, + "peerDependencies": { + "next": "*" + } + }, + "node_modules/next-sitemap/node_modules/@next/env": { + "version": "13.5.6", + "resolved": "https://registry.npmjs.org/@next/env/-/env-13.5.6.tgz", + "integrity": "sha512-Yac/bV5sBGkkEXmAX5FWPS9Mmo2rthrOPRQQNfycJPkjUAUclomCPH7QFVCDQ4Mp2k2K1SSM6m0zrxYrOwtFQw==", + "license": "MIT" + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", diff --git a/package.json b/package.json index a785146..0fa4c9d 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,9 @@ "scripts": { "dev": "next dev", "build": "next build", + "postbuild": "next-sitemap --config next-sitemap.config.js", "start": "next start", + "export": "next build && next export", "lint": "next lint", "pretty": "prettier --write \"./**/*.{js,jsx,mjs,cjs,ts,tsx,json}\"" }, @@ -20,6 +22,7 @@ "@radix-ui/react-icons": "^1.3.0", "@radix-ui/react-label": "^2.1.0", "@radix-ui/react-slot": "^1.1.0", + "@radix-ui/react-switch": "^1.1.0", "@reduxjs/toolkit": "^2.2.6", "@supabase/ssr": "^0.4.0", "@vercel/analytics": "^1.3.1", @@ -27,11 +30,13 @@ "axios": "^1.7.2", "class-variance-authority": "^0.7.0", "clsx": "^2.1.1", + "framer-motion": "^11.3.29", "jodit-react": "^4.1.2", "ldrs": "^1.0.2", "lucide-react": "^0.408.0", "next": "14.2.5", "next-client-cookies": "^1.1.1", + "next-sitemap": "^4.2.3", "react": "^18", "react-dom": "^18", "react-icons": "^5.2.1", diff --git a/public/members/placeholder.jpeg b/public/members/placeholder.jpeg new file mode 100644 index 0000000000000000000000000000000000000000..3e02fd53d45375645163e3421e4bfba7d545052c GIT binary patch literal 5514 zcmY*cbyO5y)7~YdM4F{TmJUI>OIQ|IR=|};DFJC%M7pIHSX@-3q#J3F?nb(HK}w`c zKtX|*-y7$A-`sQO&U5EE&&>Vr&dvPI3V>2u6RHUS0s#Qv?E>6j0TBR_J47@z)O7!B zIyw-Dj{e{NKk+T31JN?Fsi-5cMw-hRTDu6QJj558TD_uafECU>-$(+ZOMT!Kx z4bd|cc!Lxnv5?UXnJqS-<}@f>EO&+NvcnJJY|p)z-{p@__dXx4&GXqe`)vD(E|I-9 zU})&4^&;{@?p5B(Xa4i4sJg6AKTWIl`Mx>PczqeF8nfHZ4Dhu%xc_PU=bE__AEL_?&0B4oL>sL`>W?8{22*oC)O3Fz zp(@A&L{{YJx{EqKQ_x8rXQ1fWJi*4KJ>r$0Mm?V zkWm+GlovaKRITnp`57DMeJBQvuHeTFwmsZ2a=lsuDh0Y~nhE)`{3iEl0FUq@-`HxR8B4!gO|EG4CYjqTq1F*$A~=?RR1MdczAZ4K-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ml new file mode 100644 index 0000000..7d12815 --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,4 @@ + + +https://iiitvcc.vercel.app/sitemap-0.xml + \ No newline at end of file diff --git a/src/app/form_create/components/form.tsx b/src/app/account/components/component.tsx similarity index 62% rename from src/app/form_create/components/form.tsx rename to src/app/account/components/component.tsx index 465f3ed..6cf8c89 100644 --- a/src/app/form_create/components/form.tsx +++ b/src/app/account/components/component.tsx @@ -7,20 +7,30 @@ import { CardTitle, CardDescription, } from "@/components/ui/card"; +import Link from "next/link"; import { Label } from "@/components/ui/label"; import { Input } from "@/components/ui/input"; import { Button } from "@/components/ui/button"; +import { LogOut, User, Mail, Lock } from "lucide-react"; interface Props extends React.HTMLAttributes { username: string | null; email: string | null; disabled: boolean; + logout: () => void; } -export function Form({ username, email, disabled }: Props) { +export function Form({ username, email, disabled, logout }: Props) { return (
+
+

+ you have successfully{" "} + logged in +

+

Welcome to the platform.

+
@@ -35,14 +45,6 @@ export function Form({ username, email, disabled }: Props) {
-
-

- Create your Form -

-

- Enter your details below to get started. -

-
@@ -51,31 +53,37 @@ export function Form({ username, email, disabled }: Props) { -
- - -
-
- - -
-
- - -
-
- + + + + + +
+ + Back to Home + +
diff --git a/src/app/form_create/components/loggingout.tsx b/src/app/account/components/loggingout.tsx similarity index 93% rename from src/app/form_create/components/loggingout.tsx rename to src/app/account/components/loggingout.tsx index 83cc34f..4d44437 100644 --- a/src/app/form_create/components/loggingout.tsx +++ b/src/app/account/components/loggingout.tsx @@ -1,11 +1,10 @@ import React from "react"; -import Link from "next/link"; import { SVGProps } from "react"; import Loader from "@/components/ui/loader"; export function LoggingOut() { return ( -
+
diff --git a/src/app/form_create/components/styles.module.css b/src/app/account/components/styles.module.css similarity index 100% rename from src/app/form_create/components/styles.module.css rename to src/app/account/components/styles.module.css diff --git a/src/app/form_create/components/userform.tsx b/src/app/account/components/userform.tsx similarity index 100% rename from src/app/form_create/components/userform.tsx rename to src/app/account/components/userform.tsx diff --git a/src/app/form_create/page.tsx b/src/app/account/page.tsx similarity index 92% rename from src/app/form_create/page.tsx rename to src/app/account/page.tsx index 244c06f..011dfd3 100644 --- a/src/app/form_create/page.tsx +++ b/src/app/account/page.tsx @@ -7,9 +7,8 @@ import { User } from "@supabase/supabase-js"; import axios from "axios"; import { UserForm } from "./components/userform"; -import { Form } from "./components/form"; -import { Dropdown_Menu } from "./components/dropdown_menu"; -import { LoggingOut } from "./components/loggingout"; +import { Form } from "./components/component"; +import { LoggingOut } from "@/components/ui/loggingout"; import ErrorDialog from "@/components/error_dialog"; import { cn } from "@/lib/utils"; @@ -118,15 +117,11 @@ export default function Page() { ) : ( <> -
)} diff --git a/src/app/auth/callback/route.ts b/src/app/auth/callback/route.ts index 68eb9b2..b1b577f 100644 --- a/src/app/auth/callback/route.ts +++ b/src/app/auth/callback/route.ts @@ -6,7 +6,7 @@ export async function GET(req: NextRequest, res: NextResponse) { const code = searchParams.get("code"); const url = req.nextUrl.clone(); - url.pathname = "/form_create"; + url.pathname = "/account"; url.searchParams.delete("code"); if (code) { diff --git a/src/app/auth/component/component.tsx b/src/app/auth/component/component.tsx index 5467056..774385e 100644 --- a/src/app/auth/component/component.tsx +++ b/src/app/auth/component/component.tsx @@ -8,6 +8,12 @@ import { Button } from "@/components/ui/button"; import { Checkbox } from "@/components/ui/checkbox"; import Loader from "@/components/ui/loader"; +// @react icons +// import { MdEmail } from "react-icons/md"; +import { FaRegUserCircle } from "react-icons/fa"; +import { FiLock } from "react-icons/fi"; +import { FiUnlock } from "react-icons/fi"; + import { VscEye, VscEyeClosed } from "react-icons/vsc"; import styles from "./styles.module.css"; import { cn } from "@/lib/utils"; @@ -25,13 +31,26 @@ export function Component(props: Props) { let { auth } = props; const [password, setPassword] = useState(""); const [revealPassword, setRevealPassword] = useState(false); + const [validPassword, setValidPassword] = useState(false); const [loading, setLoading] = useState(false); + useEffect(() => { + setValidPassword(validatePassword(password)); + }, [password]); + + const input_email = { name: "email", label: "Email Adress", type: "email" }; + const input_username = { name: "username", label: "Username", type: "text" }; + const input_password = { + name: "password", + label: "Password", + type: "password", + }; + let structure = { inputfield: { limit: 1, - values: [{ name: "email", label: "Email Adress", type: "email" }], + values: [input_email], }, button: { text: "continue", @@ -49,10 +68,7 @@ export function Component(props: Props) { if (auth === "login") { structure.inputfield = { limit: 2, - values: [ - { name: "email", label: "Email address", type: "email" }, - { name: "password", label: "Password", type: "password" }, - ], + values: [input_email, input_password], }; structure.button = { text: "Login", @@ -71,11 +87,7 @@ export function Component(props: Props) { } else if (auth === "signup") { structure.inputfield = { limit: 3, - values: [ - { name: "email", label: "Email address", type: "email" }, - { name: "username", label: "Username", type: "text" }, - { name: "password", label: "Password", type: "password" }, - ], + values: [input_email, input_username, input_password], }; structure.button = { text: "Sign up", @@ -102,7 +114,7 @@ export function Component(props: Props) { const nextUserSibling = current.username .nextElementSibling as HTMLElement; nextUserSibling.innerText = ""; - if (validatePassword(password) && password.length >= 8) { + if (validPassword) { const bool = await props.SignUp(current); if (!bool) setLoading(false); @@ -112,16 +124,7 @@ export function Component(props: Props) { } else { const nextSibling = current.password .nextElementSibling as HTMLElement; - if (!validatePassword(password, 1)) { - nextSibling.innerText = - "Password must be at least 8 characters long"; - } else if (!validatePassword(password, 2)) { - nextSibling.innerText = - "Password must contain at least one uppercase, one lowercase and one digit"; - } else if (!validatePassword(password, 3)) { - nextSibling.innerText = - "Password must contain at least one special character"; - } + nextSibling.innerText = "Enter a valid password"; } } setLoading(false); @@ -141,7 +144,7 @@ export function Component(props: Props) { }, [props.email]); return ( -
+

@@ -182,11 +185,20 @@ export function Component(props: Props) { className={cn( "rounded-[8px] border border-input bg-background px-4 py-6 text-foreground placeholder-muted-foreground focus:z-10 focus:border-primary focus:outline-none sm:text-sm", input.name === "password" && "pr-12", + input.name !== "email" && "pl-12", + validPassword && + input.name === "password" && + auth === "signup" && + "border-green-600 focus:border-green-600", )} /> setRevealPassword(!revealPassword)} > {revealPassword ? ( @@ -195,9 +207,118 @@ export function Component(props: Props) { )} + + {input.name === "username" && } + {input.name === "password" && + (auth === "signup" && !validPassword ? ( + + ) : ( + + ))} +

))} + {auth === "signup" && ( +
    + Your password must be +
  • +  {" "} + {validatePassword(password, 2) ? ( + + + + ) : ( + •  + )}{" "} + uppercase/lowercase and digits +
  • +
  • +  {" "} + {validatePassword(password, 3) ? ( + + + + ) : ( + •  + )}{" "} + special characters like !@#$%^&*()_+ +
  • +
  • +  {" "} + {validatePassword(password, 1) ? ( + + + + ) : ( + •  + )}{" "} + at least 8 characters long +
  • +
+ )} + + {/* {auth === 'login' && +
+
+ + + { + if (input.name === "password") setPassword(e.target.value); + }} + id={input.name} + name={input.name} + type={ + input.type === "password" && revealPassword + ? "text" + : input.type + } + autoComplete={ + input.name === "password" ? "current-password" : "email" + } + required + placeholder={input.label} + disabled={ + props.email && input.name === "email" && auth ? true : false + } + className={cn( + "rounded-[8px] border border-input bg-background px-4 py-6 text-foreground placeholder-muted-foreground focus:z-10 focus:border-primary focus:outline-none sm:text-sm", + input.name === "password" && "pr-12", + )} + /> + + setRevealPassword(!revealPassword)} + > + {revealPassword ? ( + + ) : ( + + )} + +
+ ))} */} + {auth === "login" && (
@@ -257,7 +378,7 @@ function validatePassword(password: string, customCheck: number = 0): boolean { const re = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[!@#$%^&*()_+])[A-Za-z\d!@#$%^&*()_+]{8,}$/; const special = /[!@#$%^&*()_+]/; - const upper_lower_digit = /^(?=.*[a-z])(?=.*[A-Z])(?=.x\d)[A-Za-z\d]{8,}$/; + const upper_lower_digit = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/; if (!customCheck) return re.test(password); if (customCheck === 1) return password.length >= 8; if (customCheck === 2) return upper_lower_digit.test(password); diff --git a/src/app/auth/component/styles.module.css b/src/app/auth/component/styles.module.css index e13e8fd..77d1624 100644 --- a/src/app/auth/component/styles.module.css +++ b/src/app/auth/component/styles.module.css @@ -12,7 +12,7 @@ .inputicon { position:absolute; top: 50%; - color: rgba(var(--black-light), .45); + border-radius: 50%; font-size: 1rem; transform: translateY(-50%); transition: 0.5s ease; @@ -23,5 +23,11 @@ cursor: pointer; } .eyeicon:hover { - color: rgba(var(--black-light), .65); + background: rgba(var(--white), .03); +} +.mailicon { + left: 15px; +} +.passwordicon { + left: 15px; } \ No newline at end of file diff --git a/src/app/auth/confirm/route.ts b/src/app/auth/confirm/route.ts index 413a47c..3fa9743 100644 --- a/src/app/auth/confirm/route.ts +++ b/src/app/auth/confirm/route.ts @@ -7,7 +7,7 @@ export async function GET(req: NextRequest) { const { searchParams } = new URL(req.url); const token_hash = searchParams.get("token_hash"); const type = searchParams.get("type") as EmailOtpType | null; - const next = searchParams.get("next") ?? "/form_create"; + const next = searchParams.get("next") ?? "/account"; const redirectTo = req.nextUrl.clone(); redirectTo.pathname = next; diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index dfcf17e..f10a65b 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -51,7 +51,7 @@ export default function Auth() { setError(error); return false; } else { - router.push("/form_create"); + router.push("/account"); } } diff --git a/src/app/auth/update_password/page.tsx b/src/app/auth/update_password/page.tsx index e443363..24f8cda 100644 --- a/src/app/auth/update_password/page.tsx +++ b/src/app/auth/update_password/page.tsx @@ -34,7 +34,7 @@ export default function Update_password() { if (error) { setErrorMsg(error.message); } else { - router.replace("/form_create"); + router.replace("/account"); } } diff --git a/src/app/blogwriter/page.tsx b/src/app/blogwriter/page.tsx index f910dd7..407618c 100644 --- a/src/app/blogwriter/page.tsx +++ b/src/app/blogwriter/page.tsx @@ -24,4 +24,4 @@ const Example = () => { ); }; -export default Example; \ No newline at end of file +export default Example; diff --git a/src/app/contact_us/components/manSittingAtTableSvg.js b/src/app/contact_us/components/manSittingAtTableSvg.js index a38d55a..08bec03 100644 --- a/src/app/contact_us/components/manSittingAtTableSvg.js +++ b/src/app/contact_us/components/manSittingAtTableSvg.js @@ -1,34 +1,190 @@ -const ManSittingAtTableSvg = ()=>( - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +const ManSittingAtTableSvg = () => ( + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); -export default ManSittingAtTableSvg; \ No newline at end of file +export default ManSittingAtTableSvg; diff --git a/src/app/contact_us/components/manWithLaptopSvg.js b/src/app/contact_us/components/manWithLaptopSvg.js index fd0cfb9..050344c 100644 --- a/src/app/contact_us/components/manWithLaptopSvg.js +++ b/src/app/contact_us/components/manWithLaptopSvg.js @@ -1,26 +1,125 @@ -const ManWithLaptopSvg =()=> ( - - - - - - - - - - - - - - - - - - - - - - +const ManWithLaptopSvg = () => ( + + + + + + + + + + + + + + + + + + + + + + ); -export default ManWithLaptopSvg; \ No newline at end of file +export default ManWithLaptopSvg; diff --git a/src/app/contact_us/page.jsx b/src/app/contact_us/page.jsx index 5c2b13c..e599f5c 100644 --- a/src/app/contact_us/page.jsx +++ b/src/app/contact_us/page.jsx @@ -1,5 +1,5 @@ "use client"; -import React, { useState}from "react"; +import React, { useState } from "react"; import Image from "next/image"; import Link from "next/link"; import { Input } from "@/components/ui/input"; @@ -11,358 +11,357 @@ import "./styles.css"; import { Montserrat } from "next/font/google"; const montserratFont = Montserrat({ - weight: ["100", "200", "400", "600"], - subsets: ["latin"], + weight: ["100", "200", "400", "600"], + subsets: ["latin"], }); export default function Page() { - const [messageOrBugDropdown,setMessageOrBugDropdown] = useState(false); - const [messageOrBug, setMessageOrBug] = useState("Message"); + const [messageOrBugDropdown, setMessageOrBugDropdown] = useState(false); + const [messageOrBug, setMessageOrBug] = useState("Message"); - const [formSubmitted, setFormSubmitted] = useState(false); + const [formSubmitted, setFormSubmitted] = useState(false); - const linkedInLink = "https://www.linkedin.com/company/iiitvcc/"; - const twitterLink = "https://x.com/iiitvcc"; - const instagramLink = "https://www.instagram.com/codingclub_iiitv/"; - const facebookLink = "https://www.facebook.com/iiitvcc/"; - const ccEmailLink = "mailto:codingclub@iiitvadodara.ac.in"; + const linkedInLink = "https://www.linkedin.com/company/iiitvcc/"; + const twitterLink = "https://x.com/iiitvcc"; + const instagramLink = "https://www.instagram.com/codingclub_iiitv/"; + const facebookLink = "https://www.facebook.com/iiitvcc/"; + const ccEmailLink = "mailto:codingclub@iiitvadodara.ac.in"; - function handleDropDownClick(){ - setMessageOrBugDropdown(prev=>!prev) - } - return ( -
-
-

IIIT Vadodara

-
-

Coding Club

-
-
-

- Contact Us -

-
-
-

- At the Coding Club of IIIT Vadodara, we're more than just a group of - programmers—we're a community of innovators, creators, and - problem-solvers. Whether you have a burning question, a brilliant - idea, or just want to collaborate with like-minded tech enthusiasts, - we're here to connect. Reach out to us and let's turn your coding - dreams into reality! -

-
-
-
- + function handleDropDownClick() { + setMessageOrBugDropdown((prev) => !prev); + } + return ( +
+
+

IIIT Vadodara

+
+

Coding Club

+
+
+

+ Contact Us +

+
+
+

+ At the Coding Club of IIIT Vadodara, we're more than just a group of + programmers—we're a community of innovators, creators, and + problem-solvers. Whether you have a burning question, a brilliant + idea, or just want to collaborate with like-minded tech enthusiasts, + we're here to connect. Reach out to us and let's turn your coding + dreams into reality! +

+
+
+
+ +
+ {formSubmitted ? ( +
+ +

+ Message Send Succesfully... +

+
+ ) : ( +
+
+ { + event.preventDefault(); + setFormSubmitted(true); + }} + > +
+ +
- {formSubmitted? -
- -

- Message Send Succesfully... -

+
+ +
- : -
-
- { - event.preventDefault(); - setFormSubmitted(true)}} - > -
- - -
-
- - -
-
- - -
-
- - -
-
- -
-
-

- {messageOrBug} -

- -
-
-
- -
- -
-
-
-
-
-