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
24 changes: 0 additions & 24 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,6 @@ body {
font-family: 'Indie Flower', cursive;
}

.recipe-container {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
}

.recipe {
border: 1px solid black;
background-color: white;
padding: 5px 30px;
margin: 20px;
display: flex;
flex-direction: column;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
justify-content: space-between;
border-radius: 20px;
width: 20%;
text-align: center;
padding-bottom: 10px;
box-shadow: 4px 4px #bc6c25;
}

.recipe button{
width: 50%;
background-color: #bc6c25;
Expand Down
6 changes: 3 additions & 3 deletions src/auth/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Login(props) {
}

const handleChange = e => {
setCredentials({...credentials, [e.target.name]: e.target.value})
setCredentials(e.target.value)
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Reintroduce object-based state for credentials.

Currently, you're overwriting the entire credentials state with a single string. This breaks references to credentials.username and credentials.password. You likely want to preserve the structure when updating different fields:

-    setCredentials(e.target.value)
+    setCredentials({
+      ...credentials,
+      [e.target.name]: e.target.value,
+    })
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
setCredentials(e.target.value)
setCredentials({
...credentials,
[e.target.name]: e.target.value,
})

}

return (
Expand All @@ -42,7 +42,7 @@ function Login(props) {
<label className='label' for='password'>password:</label>
<TextField
className='login-text'
type="password"
type="text"
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Do not render the password in plain text.

Changing the type attribute to "text" exposes the password, creating a security risk. Revert to "password":

-            type="text"
+            type="password"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
type="text"
type="password"

name="password"
value={credentials.password}
onChange={handleChange}
Expand All @@ -55,4 +55,4 @@ function Login(props) {
)
}

export default Login
export default Login