Compare commits

..

6 Commits

2 changed files with 15 additions and 15 deletions
+5 -5
View File
@@ -10,14 +10,14 @@ import { recoverPWD } from '../../services/services';
const validationSchema = Yup.object().shape({
username: Yup.string()
.email("Wrong email format")
// .email("Wrong email format")
// .matches(
// /^[^0-9][a-zA-Z0-9._%+-]+@[a-zA-Z]+(\.[a-zA-Z]+)+$/,
// "Invalid email format"
// )
.min(3, "Minimum 3 characters")
.max(50, "Maximum 50 characters")
.required("Email is required"),
.required("Username is required"),
})
const initialValues = {
@@ -50,7 +50,7 @@ export default function Forgetpwd2() {
<div className="d-flex align-items-center h-100-vh">
<div className="login p-50">
<h1 className="mb-2">Recover Password</h1>
<p>Please enter your email.</p>
<p>Please enter your username.</p>
<Formik
initialValues={initialValues}
validationSchema={validationSchema}
@@ -64,8 +64,8 @@ export default function Forgetpwd2() {
<>
<div className="col-12">
<div className="form-group">
<label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Email*</label>
<input type="email" name='username' className="form-control" placeholder="Email" value={props.values.username} onChange={props.handleChange} />
<label className={`text-black fw-bold control-label ${(props.errors.username && props.touched.username) && 'text-danger'}`}>Username*</label>
<input type="text" name='username' className="form-control" placeholder="Username" value={props.values.username} onChange={props.handleChange} />
</div>
</div>
{mutation.error &&
+10 -10
View File
@@ -64,15 +64,15 @@ export default function EventCalendar({draggedEvent, setDraggedEvent, removeAfte
}
function handleEventClick(clickInfo) {
if (
confirm(
`Are you sure you want to delete the event '${clickInfo.event.title}'`
)
) {
clickInfo.event.remove();
}
}
// function handleEventClick(clickInfo) {
// if (
// confirm(
// `Are you sure you want to delete the event '${clickInfo.event.title}'`
// )
// ) {
// clickInfo.event.remove();
// }
// }
function handleEvents(events) {
// setCurrentEvents(events);
@@ -98,7 +98,7 @@ export default function EventCalendar({draggedEvent, setDraggedEvent, removeAfte
events={currentEvents}
select={handleDateSelect}
eventContent={renderEventContent} // custom render function
eventClick={handleEventClick}
// eventClick={handleEventClick}
eventsSet={handleEvents} // called after events are initialized/added/changed/removed
/* you can update a remote database when these fire:
eventAdd={function(){}}