@@ -48,34 +48,37 @@ export default function CreateLCMeetup() {
4848 date : date ( ) ,
4949 duration : 3
5050 } ;
51- const onSubmit = ( values : any ) => {
52- if ( ! selectedLocation ) {
53- toast . error ( "Please select a location for the meetup" ) ;
54- return ;
55- }
56- setIsLoading ( true ) ;
57- const date = new Date ( values . date ) ;
58- const meetupData : LCMeetCreate = {
59- circle_id : params . circle_id ?? "" ,
60- title : values . title ,
61- is_report_needed : values . is_proof_required ,
62- report_description : values . proof_description ,
63- meet_place : selectedLocation . name ,
64- coord_x : selectedLocation . lat ,
65- coord_y : selectedLocation . lon ,
66- meet_time : date . toISOString ( ) ,
67- duration : values . duration
68- } ;
51+ // const onSubmit = (values: any) => {
52+ // if (!selectedLocation) {
53+ // toast.error("Please select a location for the meetup");
54+ // return;
55+ // }
56+ // setIsLoading(true);
57+ // const date = new Date(values.date);
58+ // const meetupData: LCMeetCreate = {
59+ // circle_id: params.circle_id ?? "",
60+ // title: values.title,
61+ // is_report_needed: values.is_proof_required,
62+ // report_description: values.proof_description,
63+ // meet_place: selectedLocation.name,
64+ // coord_x: selectedLocation.lat,
65+ // coord_y: selectedLocation.lon,
66+ // meet_time: date.toISOString(),
67+ // duration: values.duration,
68+ // description: values.,
69+ // meet_link,
70+ // mode
71+ // };
6972
70- scheduleMeetup ( meetupData ) . then ( status => {
71- setIsLoading ( false ) ;
72- if ( status ) {
73- navigate (
74- `/dashboard/learningcircle/dashboard/${ params . circle_id } `
75- ) ;
76- }
77- } ) ;
78- } ;
73+ // scheduleMeetup(meetupData).then(status => {
74+ // setIsLoading(false);
75+ // if (status) {
76+ // navigate(
77+ // `/dashboard/learningcircle/dashboard/${params.circle_id}`
78+ // );
79+ // }
80+ // });
81+ // };
7982 const handleLocationSearch = ( location : string ) => {
8083 setLocationLoading ( true ) ;
8184 searchCoordinates ( location ) . then ( data => {
@@ -87,11 +90,10 @@ export default function CreateLCMeetup() {
8790 return (
8891 < div className = { styles . createLCMeetup } >
8992 < h1 > Schedule your next meet</ h1 >
90- < Formik initialValues = { initialValues } onSubmit = { onSubmit } >
93+ { /* <Formik initialValues={initialValues} onSubmit={onSubmit}>
9194 {formik => (
9295 <Form className={styles.form}>
9396 <div className={styles.formGroup}>
94- { /* <label htmlFor="title">Title</label> */ }
9597 <SimpleInput
9698 name="title"
9799 required
@@ -126,9 +128,6 @@ export default function CreateLCMeetup() {
126128 </div>
127129 {formik.values.is_proof_required ? (
128130 <div className={styles.formGroup}>
129- { /* <label htmlFor="proof_description">
130- Proof description
131- </label> */ }
132131 <textarea
133132 required={formik.values.is_proof_required}
134133 maxLength={1000}
@@ -254,7 +253,7 @@ export default function CreateLCMeetup() {
254253 </PowerfulButton>
255254 </Form>
256255 )}
257- </ Formik >
256+ </Formik> */ }
258257 </ div >
259258 ) ;
260259}
0 commit comments