Pārlūkot izejas kodu

added hide timeslot to hide timeslot when backchevron is clicked

develop
Ajay_S pirms 3 gadiem
vecāks
revīzija
c61bb49f58
3 mainītis faili ar 18 papildinājumiem un 8 dzēšanām
  1. +4
    -3
      src/components/timeSlot/TimeSlot.tsx
  2. +7
    -3
      src/pages/finalInterview/FinalInterview.tsx
  3. +7
    -2
      src/pages/technicalInterview/TechnicalInterview.tsx

+ 4
- 3
src/components/timeSlot/TimeSlot.tsx Parādīt failu

@@ -8,7 +8,8 @@ import { Dates, TimeSlots } from "../../mockData/TimeSlotDetails";

interface OwnProps {
month: string;
getDate: (date: string) => void;
getDate: () => void;
HideTimeSlot: () => void;
}

const TimeSlot: React.FC<OwnProps> = (props) => {
@@ -49,7 +50,7 @@ const TimeSlot: React.FC<OwnProps> = (props) => {
return (
<IonPage>
<header className={styles.header}>
<IonIcon icon={chevronBack} />
<IonIcon icon={chevronBack} onClick={props.HideTimeSlot} />
<h4>Find a Slot</h4>
</header>

@@ -68,7 +69,7 @@ const TimeSlot: React.FC<OwnProps> = (props) => {
</div>
</div>

<div onClick={(highlightedDate && highlightedTime !== "") ? () => props.getDate("test") : undefined}
<div onClick={(highlightedDate && highlightedTime !== "") ? () => props.getDate() : undefined}
className={styles.timeSlotButton + " " + (highlightedDate && highlightedTime !== "" ? styles.buttonActive : "")}>
<IonButton shape="round" expand='block' >Confirm slot</IonButton>
</div>


+ 7
- 3
src/pages/finalInterview/FinalInterview.tsx Parādīt failu

@@ -17,12 +17,15 @@ const FinalInterview: React.FC = () => {

const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3));

const getDate = (date: string) => {
console.log(date);
const getDate = () => {
setTimeSlot(false);
setDate(true);
}

const HideTimeSlot = () => {
setTimeSlot(false);
}

return (
<IonPage>
<StepHeader roundName="Final Interview" stepNumber={5} />
@@ -77,7 +80,8 @@ const FinalInterview: React.FC = () => {
isTimeSlot &&
<TimeSlot
month="April-May"
getDate={getDate} />
getDate={getDate}
HideTimeSlot={HideTimeSlot} />
}

</IonContent>


+ 7
- 2
src/pages/technicalInterview/TechnicalInterview.tsx Parādīt failu

@@ -24,11 +24,15 @@ const TechnicalInterview: React.FC = () => {

const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3));

const getDate = (date: string) => {
const getDate = () => {
setTimeSlot(false);
setDate(true);
}

const HideTimeSlot = () => {
setTimeSlot(false);
}

return (
<IonPage>
<StepHeader stepNumber={3} roundName="Technical Interview" />
@@ -88,7 +92,8 @@ const TechnicalInterview: React.FC = () => {
isTimeSlot &&
<TimeSlot
month="April-May"
getDate={getDate} />
getDate={getDate}
HideTimeSlot={HideTimeSlot} />
}

</IonContent>


Notiek ielāde…
Atcelt
Saglabāt