| @@ -8,7 +8,8 @@ import { Dates, TimeSlots } from "../../mockData/TimeSlotDetails"; | |||||
| interface OwnProps { | interface OwnProps { | ||||
| month: string; | month: string; | ||||
| getDate: (date: string) => void; | |||||
| getDate: () => void; | |||||
| HideTimeSlot: () => void; | |||||
| } | } | ||||
| const TimeSlot: React.FC<OwnProps> = (props) => { | const TimeSlot: React.FC<OwnProps> = (props) => { | ||||
| @@ -49,7 +50,7 @@ const TimeSlot: React.FC<OwnProps> = (props) => { | |||||
| return ( | return ( | ||||
| <IonPage> | <IonPage> | ||||
| <header className={styles.header}> | <header className={styles.header}> | ||||
| <IonIcon icon={chevronBack} /> | |||||
| <IonIcon icon={chevronBack} onClick={props.HideTimeSlot} /> | |||||
| <h4>Find a Slot</h4> | <h4>Find a Slot</h4> | ||||
| </header> | </header> | ||||
| @@ -68,7 +69,7 @@ const TimeSlot: React.FC<OwnProps> = (props) => { | |||||
| </div> | </div> | ||||
| </div> | </div> | ||||
| <div onClick={(highlightedDate && highlightedTime !== "") ? () => props.getDate("test") : undefined} | |||||
| <div onClick={(highlightedDate && highlightedTime !== "") ? () => props.getDate() : undefined} | |||||
| className={styles.timeSlotButton + " " + (highlightedDate && highlightedTime !== "" ? styles.buttonActive : "")}> | className={styles.timeSlotButton + " " + (highlightedDate && highlightedTime !== "" ? styles.buttonActive : "")}> | ||||
| <IonButton shape="round" expand='block' >Confirm slot</IonButton> | <IonButton shape="round" expand='block' >Confirm slot</IonButton> | ||||
| </div> | </div> | ||||
| @@ -17,12 +17,15 @@ const FinalInterview: React.FC = () => { | |||||
| const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3)); | const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3)); | ||||
| const getDate = (date: string) => { | |||||
| console.log(date); | |||||
| const getDate = () => { | |||||
| setTimeSlot(false); | setTimeSlot(false); | ||||
| setDate(true); | setDate(true); | ||||
| } | } | ||||
| const HideTimeSlot = () => { | |||||
| setTimeSlot(false); | |||||
| } | |||||
| return ( | return ( | ||||
| <IonPage> | <IonPage> | ||||
| <StepHeader roundName="Final Interview" stepNumber={5} /> | <StepHeader roundName="Final Interview" stepNumber={5} /> | ||||
| @@ -77,7 +80,8 @@ const FinalInterview: React.FC = () => { | |||||
| isTimeSlot && | isTimeSlot && | ||||
| <TimeSlot | <TimeSlot | ||||
| month="April-May" | month="April-May" | ||||
| getDate={getDate} /> | |||||
| getDate={getDate} | |||||
| HideTimeSlot={HideTimeSlot} /> | |||||
| } | } | ||||
| </IonContent> | </IonContent> | ||||
| @@ -24,11 +24,15 @@ const TechnicalInterview: React.FC = () => { | |||||
| const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3)); | const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3)); | ||||
| const getDate = (date: string) => { | |||||
| const getDate = () => { | |||||
| setTimeSlot(false); | setTimeSlot(false); | ||||
| setDate(true); | setDate(true); | ||||
| } | } | ||||
| const HideTimeSlot = () => { | |||||
| setTimeSlot(false); | |||||
| } | |||||
| return ( | return ( | ||||
| <IonPage> | <IonPage> | ||||
| <StepHeader stepNumber={3} roundName="Technical Interview" /> | <StepHeader stepNumber={3} roundName="Technical Interview" /> | ||||
| @@ -88,7 +92,8 @@ const TechnicalInterview: React.FC = () => { | |||||
| isTimeSlot && | isTimeSlot && | ||||
| <TimeSlot | <TimeSlot | ||||
| month="April-May" | month="April-May" | ||||
| getDate={getDate} /> | |||||
| getDate={getDate} | |||||
| HideTimeSlot={HideTimeSlot} /> | |||||
| } | } | ||||
| </IonContent> | </IonContent> | ||||