-
Notifications
You must be signed in to change notification settings - Fork 16
Sign Up Card Updated #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
signup card updated
Feature/signup card
|
@ayushnawalpathak23 is attempting to deploy a commit to the 24155442-kiitacin's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR adds a new sign-up page component to the application and integrates it into the routing system. The implementation includes form validation, password visibility toggling, and styling consistent with the existing login page.
Key changes:
- New SignUpcard component with form fields for full name, username, email, and password
- Routing integration in App.tsx with a new /signup route
- Configuration updates to TypeScript and package files
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/components/Signup_card.tsx | New sign-up form component with validation and ShineBorder UI |
| frontend/src/App.tsx | Added import and route for the new SignUpcard component |
| frontend/tsconfig.app.json | Added path aliases configuration (duplicated) |
| frontend/package-lock.json | Removed react-router-dom dependency entry |
| frontend/src/index.css | Removed blank line for formatting |
| frontend/src/components/ui/shine-border.tsx | Removed blank line for formatting |
| frontend/index.html | Added blank lines (minor formatting) |
| package-lock.json | Added new lockfile at root level |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)
frontend/tsconfig.app.json:22
- Duplicate configuration detected. The baseUrl and paths are defined twice (lines 10-15 and 17-22). This creates redundant configuration and should be consolidated into a single definition.
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
"baseUrl": ".",
"paths": {
"@/*": [
"./src/*"
]
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "clsx": "^2.1.1", | ||
| "lucide-react": "^0.562.0", | ||
| "react": "^19.2.0", | ||
| "react-dom": "^19.2.0", |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The react-router-dom dependency is removed from package-lock.json but it still exists in package.json (line 19) and is actively used in App.tsx. This creates an inconsistency between the lockfile and package.json, which will cause issues when dependencies are installed. Either restore the dependency in package-lock.json by running npm install, or if removal was intentional, also remove it from package.json.
| "react-dom": "^19.2.0", | |
| "react-dom": "^19.2.0", | |
| "react-router-dom": "^7.6.0", |
| } | ||
|
|
||
| setError(""); | ||
| console.log({ fullName, username, email, password, confirmPassword }); |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sensitive user data (including password) is being logged to the console in production code. This poses a security risk by exposing passwords in browser console logs and potentially in log aggregation systems. Remove the console.log statement or ensure it's only present in development mode with appropriate sanitization that excludes the password field.
| console.log({ fullName, username, email, password, confirmPassword }); | |
| if (process.env.NODE_ENV === "development") { | |
| console.log({ fullName, username, email }); | |
| } |
| <div> | ||
| <label className="text-sm text-gray-300">Full Name</label> | ||
| <input | ||
| type="text" | ||
| value={fullName} | ||
| onChange={(e) => setFullName(e.target.value)} | ||
| placeholder="John Doe" | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" | ||
| /> | ||
| </div> | ||
|
|
||
| {/* Username */} | ||
| <div> | ||
| <label className="text-sm text-gray-300">Username</label> | ||
| <input | ||
| type="text" | ||
| value={username} | ||
| onChange={(e) => setUsername(e.target.value)} | ||
| placeholder="username" | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" | ||
| /> | ||
| </div> | ||
|
|
||
| {/* Email */} | ||
| <div> | ||
| <label className="text-sm text-gray-300">Email ID</label> | ||
| <input | ||
| type="email" | ||
| value={email} | ||
| onChange={(e) => setEmail(e.target.value)} | ||
| placeholder="[email protected]" | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" | ||
| /> | ||
| </div> | ||
|
|
||
| {/* Passwords */} | ||
| <div className="flex gap-4"> | ||
| <div className="flex-1"> | ||
| <label className="text-sm text-gray-300">Password</label> | ||
| <div className="relative "> | ||
| <input | ||
| type={showPassword ? "text" : "password"} | ||
| value={password} | ||
| onChange={(e) => setPassword(e.target.value)} | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" | ||
| /> | ||
| <button | ||
| type="button" | ||
| onClick={() => setShowPassword((prev) => !prev)} | ||
| className="absolute right-3 top-1/2 -translate-y-1/2 text-xs text-[#2F5BFF]" | ||
| > | ||
| {showPassword ? "Hide" : "Show"} | ||
| </button> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div className="flex-1"> | ||
| <label className="text-sm text-gray-300"> | ||
| Confirm Password | ||
| </label> | ||
| <input | ||
| type={showPassword ? "text" : "password"} | ||
| value={confirmPassword} | ||
| onChange={(e) => setConfirmPassword(e.target.value)} | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" | ||
| /> |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The form inputs lack proper accessibility attributes. Add htmlFor attributes to labels that match the id attributes of their corresponding inputs, and ensure all form fields have associated labels. For example, the label on line 62 should have htmlFor="fullName" and the input should have id="fullName". This is important for screen reader users and keyboard navigation.
| <div className="flex mb-6 large p-1 bg-[#111123] text-sm font-medium"> | ||
| <button className="flex-1 py-2 rounded-md text-gray-400 text-sm transition hover:-translate-y-px "> | ||
| Log In | ||
| </button> | ||
| <button className="flex-1 py-2 rounded-md bg-[#2F5BFF] text-sm font-medium transition hover:-translate-y-px"> | ||
| Sign Up | ||
| </button> | ||
| </div> |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tab switcher buttons (Log In and Sign Up) are non-functional. They appear to be navigation elements but have no onClick handlers or Link components. Consider using react-router-dom's Link component to navigate to the appropriate routes, similar to the navigation in App.tsx.
| setError("All fields are required."); | ||
| return; | ||
| } | ||
|
|
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The email validation only checks for a non-empty value, not whether it's a valid email format. While the input type is "email", client-side validation can be bypassed. Consider adding explicit email format validation in the handleSubmit function to match patterns used elsewhere in the codebase or provide better user feedback.
| const emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/; | |
| if (!emailPattern.test(email)) { | |
| setError("Please enter a valid email address."); | |
| return; | |
| } |
| if (password !== confirmPassword) { | ||
| setError("Passwords do not match."); | ||
| return; | ||
| } |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The password fields lack validation requirements. There are no checks for minimum length, complexity, or strength. Consider adding password validation to ensure users create secure passwords (e.g., minimum 8 characters, mix of letters/numbers/symbols).
| type={showPassword ? "text" : "password"} | ||
| value={confirmPassword} | ||
| onChange={(e) => setConfirmPassword(e.target.value)} | ||
| className="mt-1 w-full rounded-md bg-black/40 border border-white/20 px-3 py-2 outline-none focus:border-[#2F5BFF]" |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent indentation: this line is missing proper indentation (should start at column 16-17 like surrounding lines). This affects code readability and maintainability.
| @@ -0,0 +1,154 @@ | |||
| import { useState } from "react"; | |||
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leading whitespace on line 1 is inconsistent with the rest of the file. All other lines start without leading spaces. This should be removed to maintain consistent formatting.
| import { useState } from "react"; | |
| import { useState } from "react"; |
|
|
||
| {/* Header */} | ||
| <h2 className="text-4xl font-bold mb-1 flex items-center justify-center">Create your account</h2> | ||
| <p className=" text-1xl text-gray-400 font-bold text-sm mb-4 flex items-center justify-center"> |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid Tailwind CSS class name. The class "text-1xl" does not exist in Tailwind. Valid text size classes are text-xs, text-sm, text-base, text-lg, text-xl, text-2xl, etc. Consider using "text-xl" or "text-base" instead.
| <p className=" text-1xl text-gray-400 font-bold text-sm mb-4 flex items-center justify-center"> | |
| <p className=" text-xl text-gray-400 font-bold text-sm mb-4 flex items-center justify-center"> |
| <ShineBorder shineColor={["#2F5BFF", "white"]} /> | ||
|
|
||
| {/* Tab Switcher */} | ||
| <div className="flex mb-6 large p-1 bg-[#111123] text-sm font-medium"> |
Copilot
AI
Jan 4, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Invalid Tailwind CSS class name. The class "large" is not a standard Tailwind utility class. If this was intended to apply a size-related style, use a proper Tailwind class. If it's a custom class, ensure it's defined in your Tailwind configuration.
| <div className="flex mb-6 large p-1 bg-[#111123] text-sm font-medium"> | |
| <div className="flex mb-6 p-1 bg-[#111123] text-sm font-medium"> |
There were some issues in app.tsx i added my sign up page inside it.
