Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CommDesk
Submodule CommDesk added at 46d10e
8 changes: 4 additions & 4 deletions src/Component/ui/Input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
<label
htmlFor={name}
className="text-xs font-semibold uppercase tracking-wider"
style={{ color: theme.text.secondary }}
style={{ color: "black"}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding the color to 'black' inside a reusable component bypasses the application's theme configuration (theme.text.secondary). This breaks dark mode support and consistency across the app. If a specific color is needed for a particular instance, it should be passed via props or handled through Tailwind classes rather than hardcoded in the base component.

Suggested change
style={{ color: "black"}}
style={{ color: theme.text.secondary }}

>
{label}
</label>
Expand All @@ -57,7 +57,7 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
<div
className="flex items-center gap-2 rounded-lg px-3 py-2 border transition-all duration-150"
style={{
backgroundColor: theme.bg.surface,
backgroundColor: "black",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding the background color to 'black' breaks the theming system for this reusable component. It should continue to use theme.bg.surface to respect the active theme (light/dark mode).

Suggested change
backgroundColor: "black",
backgroundColor: theme.bg.surface,

borderColor: error ? theme.danger.default : theme.border.default,
boxShadow: error ? `0 0 0 3px ${theme.danger.subtle}` : undefined,
}}
Expand All @@ -79,8 +79,8 @@ export const Input = forwardRef<HTMLInputElement, InputProps>(
required={required}
onKeyDown={onKeyDown}
onChange={(e) => onChange?.(name, e.target.value)}
className={`flex-1 bg-transparent outline-none text-sm ${inputClassName}`}
style={{ color: theme.text.primary }}
className={`flex-1 bg-black text-white outline-none text-sm ${inputClassName}`}
style={{ color: "white" }}
Comment on lines +82 to +83
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Hardcoding bg-black text-white and color: "white" overrides the theme settings (theme.text.primary) and prevents the input from rendering correctly in other themes (e.g., light mode).

Suggested change
className={`flex-1 bg-black text-white outline-none text-sm ${inputClassName}`}
style={{ color: "white" }}
className={"flex-1 bg-transparent outline-none text-sm " + inputClassName}
style={{ color: theme.text.primary }}

/>

{rightIcon && (
Expand Down
4 changes: 2 additions & 2 deletions src/features/Auth/v1/Pages/LoginPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ const LoginPage = () => {

<Input
name="password"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full px-3 py-2 border border-gray-300 rounded-md text-black bg-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Enter your password"
type="password"
type="text"
/>
Comment on lines 94 to 99
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

security-critical critical

Changing the password input type to "text" permanently exposes the user's password in plain text on the screen. This is a major security risk. If a password visibility toggle is desired, you should implement a state variable (e.g., showPassword) and a button to toggle the input type between "password" and "text" dynamically, rather than hardcoding it to "text".

Suggested change
<Input
name="password"
className="w-full px-3 py-2 border border-gray-300 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500"
className="w-full px-3 py-2 border border-gray-300 rounded-md text-black bg-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Enter your password"
type="password"
type="text"
/>
<Input
name="password"
className="w-full px-3 py-2 border border-gray-300 rounded-md text-black bg-white placeholder:text-gray-500 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500"
placeholder="Enter your password"
type="password"
/>

</div>
<button
Expand Down
4 changes: 2 additions & 2 deletions src/features/Auth/v1/Pages/SignUpPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ export default function SignUpPage() {
</div>

<h1 className="text-4xl xl:text-5xl font-black text-white leading-[1.15]">
Empower Your <br />
Empowering <br />
<span className="text-transparent bg-clip-text bg-linear-to-r from-indigo-300 via-purple-300 to-pink-300">
Community
Communities Through Collaborations
</span>
</h1>

Expand Down