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/api/v1/get/blogs/route.ts b/src/app/api/v1/get/blogs/route.ts
index ed3b0bf..9f5b896 100644
--- a/src/app/api/v1/get/blogs/route.ts
+++ b/src/app/api/v1/get/blogs/route.ts
@@ -36,10 +36,11 @@ export async function GET(request: NextRequest): Promise {
const blogFileUrl = `${getPublicUrl(`/blogs/${blog.id}/blog`)}`;
const { data: images, error: imagesError } = await supabase.storage
- .from(process.env.BUCKET || "")
+ .from(process.env.NEXT_PUBLIC_BUCKET || "")
.list(`images/${blog.id}`);
if (imagesError) {
+ console.log("imagesError", imagesError);
throw new Error(imagesError.message);
}
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 (
-
- 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!
-
+ 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!
+
+ Our team is a group of passionate individuals who are dedicated to
+ making a difference in the world of technology. We are a diverse group
+ of people who are united by our love for coding and technology. We are
+ committed to helping each other grow and learn, and we are always
+ looking for new members to join us on our journey. If you are passionate
+ about technology and coding, we would love to have you on our team!
+