Skip to content

Commit

Permalink
refactor: update HTML (React) warnings (#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
devarshishimpi authored Oct 10, 2022
2 parents eb72097 + 45f997b commit bdac0ba
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
8 changes: 4 additions & 4 deletions frontend/src/components/Account/Account.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,15 @@ const Account = () => {
onSubmit={changePassword}
id="notes-form"
action="#"
enctype="multipart/form-data"
encType="multipart/form-data"
>
<div className="row title">
<label>Current Password</label>
<input
id="modal-current-password-input"
type="password"
name="title"
spellcheck="false"
spellCheck="false"
onChange={(e) => setCurrentPassword(e.target.value)}
/>
</div>
Expand All @@ -137,7 +137,7 @@ const Account = () => {
id="modal-new-password-input"
type="password"
name="title"
spellcheck="false"
spellCheck="false"
onChange={(e) => setNewPassword(e.target.value)}
/>
</div>
Expand All @@ -148,7 +148,7 @@ const Account = () => {
id="modal-confirm-password-input"
type="password"
name="title"
spellcheck="false"
spellCheck="false"
onChange={(e) => setConfirmPassword(e.target.value)}
/>
</div>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/ForgotPassword/ForgotPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const ForgotPassword = () => {
<title>Noteslify | Forgot Password</title>
<meta name="description" content="Noteslify. Reset Your Password From Here." />
</Helmet>
<div class="form-wrapper">
<div className="form-wrapper">
<h1>Forgot Password?</h1>
<br></br>
<p>Please enter your registered email to receive your forgot Password Link</p>
Expand All @@ -46,8 +46,8 @@ const ForgotPassword = () => {
<input type="email" name="email" value={email} onChange={(e) => setEmail(e.target.value)} required="required" placeholder="Email Address"></input>
</div>
<div className="button-panel">
{!isLoading && <input type="submit" class="button" title="Sign In" value="Send Email"></input>}
{isLoading && <button style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true} class="button" value=""><span class="loader"></span></button>}
{!isLoading && <input type="submit" className="button" title="Sign In" value="Send Email"></input>}
{isLoading && <button style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true} className="button" value=""><span className="loader"></span></button>}
</div>
</form>
<div className="form-footer">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Login/Login.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Login = () => {
<Link to="/forgotpassword" className="form__forgot">Forgot Password?</Link>

{!isLoading && <button type="submit" className="form__button">Login</button>}
{isLoading && <button type="submit" className="form__button" style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true}><span class="loader"></span></button>}
{isLoading && <button type="submit" className="form__button" style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true}><span className="loader"></span></button>}

<div style={{marginBottom: '25px',textAlign:'center'}}>
Don't have an account ? <Link to={'/signup'}>Sign up here</Link>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/Notes/MarkdownNotes.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ export default function MarkdownNotes(props) {
return (
<div className="content">

<form onSubmit={addANewNote} id="notes-form" action="#" enctype="multipart/form-data">
<form onSubmit={addANewNote} id="notes-form" action="#" encType="multipart/form-data">
<div className="md">
<div className="row title">
<input id='modal-title-input' value={props.addNoteTitle} onChange={(e) => props.setAddNoteTitle(e.target.value)} type="text" name="title" spellcheck="false"/>
<input id='modal-title-input' value={props.addNoteTitle} onChange={(e) => props.setAddNoteTitle(e.target.value)} type="text" name="title" spellCheck="false"/>
</div>
<div className="row description wmde-markdown-var">
<MDEditor value={props.addNoteDescription} onChange={(e) => props.setAddNoteDescription(e)} />
Expand Down
18 changes: 9 additions & 9 deletions frontend/src/components/Notes/Notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,17 +237,17 @@ const Notes = () => {
<div className="content">
<header>
<p>Add a new Note</p>
<i class="fa-brands fa-markdown" onClick={openAddMarkdownWindow}></i>
<i className="fa-brands fa-markdown" onClick={openAddMarkdownWindow}></i>
<i onClick={closeAddNoteModal} className="fa-solid fa-xmark"></i>
</header>
<form onSubmit={addANewNote} id="notes-form" action="#" enctype="multipart/form-data">
<form onSubmit={addANewNote} id="notes-form" action="#" encType="multipart/form-data">
<div className="row title">
{/* <label>Title</label> */}
<input id='modal-title-input' value={addNoteTitle} onChange={(e) => setAddNoteTitle(e.target.value)} type="text" name="title" spellcheck="false"/>
<input id='modal-title-input' value={addNoteTitle} onChange={(e) => setAddNoteTitle(e.target.value)} type="text" name="title" spellCheck="false"/>
</div>
<div className="row description">
{/* <label>Description</label> */}
<textarea value={addNoteDescription} onChange={(e) => setAddNoteDescription(e.target.value)} name="description" spellcheck="false"></textarea>
<textarea value={addNoteDescription} onChange={(e) => setAddNoteDescription(e.target.value)} name="description" spellCheck="false"></textarea>
</div>
<button>Add Note</button>
</form>
Expand All @@ -272,18 +272,18 @@ const Notes = () => {
<div className="content">
<header>
<p>Edit Note</p>
<i class="fa-brands fa-markdown" onClick={openEditMarkdownWindow}></i>
<i className="fa-brands fa-markdown" onClick={openEditMarkdownWindow}></i>
<i onClick={closeEditNoteModal} className="fa-solid fa-xmark"></i>

</header>
<form onSubmit={updateNote} id="notes-form" action="#" enctype="multipart/form-data">
<form onSubmit={updateNote} id="notes-form" action="#" encType="multipart/form-data">
<div className="row title">
{/* <label>Title</label> */}
<input value={addNoteTitle} onChange={(e) => setAddNoteTitle(e.target.value)} id='modal-title-input' type="text" name="title" spellcheck="false"/>
<input value={addNoteTitle} onChange={(e) => setAddNoteTitle(e.target.value)} id='modal-title-input' type="text" name="title" spellCheck="false"/>
</div>
<div className="row description">
{/* <label>Description</label> */}
<textarea value={addNoteDescription} onChange={(e) => setAddNoteDescription(e.target.value)} name="description" spellcheck="false"></textarea>
<textarea value={addNoteDescription} onChange={(e) => setAddNoteDescription(e.target.value)} name="description" spellCheck="false"></textarea>
</div>
<button>Update Note</button>
</form>
Expand Down Expand Up @@ -311,7 +311,7 @@ const Notes = () => {
<i onClick={closePreviewNoteModal} className="fa-solid fa-xmark"></i>

</header>
<form id="notes-form" action="#" enctype="multipart/form-data">
<form id="notes-form" action="#" encType="multipart/form-data">
<div className="row title">
<div name="title" className="previewbox previewtitle" dangerouslySetInnerHTML={{ __html: marked(addNoteTitle) }}></div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/ResetPassword/ResetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const ResetPassword = () => {

return (
<div>
{isValidToken && <div class="form-wrapper">
{isValidToken && <div className="form-wrapper">
<h1>Set New Password</h1>
<br></br>
<p>Your Email Address: <strong>{email}</strong></p>
Expand All @@ -70,7 +70,7 @@ const ResetPassword = () => {
<input type="password" name="password" value={password} onChange={(e) => setPassword(e.target.value)} required="required" placeholder="Enter Your New Password"></input>
</div>
<div className="button-panel">
<input type="submit" class="button" title="Sign In" value="Change Password"></input>
<input type="submit" className="button" title="Sign In" value="Change Password"></input>
</div>
</form>
<div className="form-footer">
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Sidenav/Sidenav.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ const Sidenav = () => {

<li className="nav-link">
<a href="/">
<i class="fa-solid fa-wallet icon"></i>
<i className="fa-solid fa-wallet icon"></i>
<span className="text nav-text">Soon..</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/Signup/Signup.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Signup = () => {
</div>
<br></br>
{!isLoading && <button type="submit" className="form__button">Register</button>}
{isLoading && <button type="submit" className="form__button" style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true}><span class="loader"></span></button>}
{isLoading && <button type="submit" className="form__button" style={{backgroundColor: '#15203a', cursor: 'not-allowed'}} disabled={true}><span className="loader"></span></button>}

<div style={{marginBottom: '25px',textAlign:'center'}}>
Already have an account ? <Link to={'/login'}>Login here</Link>
Expand Down

0 comments on commit bdac0ba

Please sign in to comment.