Pārlūkot izejas kodu

hardcoded countdown date

develop
Ajay_S pirms 3 gadiem
vecāks
revīzija
56b29ef525
2 mainītis faili ar 11 papildinājumiem un 19 dzēšanām
  1. +9
    -3
      src/pages/finalInterview/FinalInterview.tsx
  2. +2
    -16
      src/pages/technicalInterview/TechnicalInterview.tsx

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

@@ -9,13 +9,14 @@ import { useState } from "react";
import TimeSlot from "../../components/timeSlot/TimeSlot";
import { useCountdown } from "../../components/CountDownTimer/useCountdown";
import { addDays } from "date-fns";
import CountdownTimer from "../../components/CountDownTimer/CountdownTimer";

const FinalInterview: React.FC = () => {

const [isDateSet, setDate] = useState<boolean>(false);
const [isTimeSlot, setTimeSlot] = useState<boolean>(false);

const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3));
const [days, hours, minutes, seconds] = useCountdown(new Date('may 6, 2022 07:00:00'));

const getDate = () => {
setTimeSlot(false);
@@ -45,13 +46,18 @@ const FinalInterview: React.FC = () => {

<h4>Let's Meet in:</h4>
<div className={styles.timeLeft}>
<h4 className={styles.time}>02 : 04 : 25 : 53</h4>
{/* <h4 className={styles.time}>02 : 04 : 25 : 53</h4>
<div className={styles.days}>
<div>Days</div>
<div>Hrs</div>
<div>Mins</div>
<div>Secs</div>
</div>
</div> */}
<CountdownTimer
days={days}
hours={hours}
minutes={minutes}
seconds={seconds} />
</div>
<h4>Join us on Google Meet</h4>
<div className={styles.icon}>


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

@@ -5,24 +5,17 @@ import StepHeader from "../../components/stepsHeader/StepHeader";
import techinicalInterview from "../../assets/icons/Technical_Interview.svg";
import linkIcon from "../../assets/icons/link.svg";
import { Link } from "react-router-dom";
import { useEffect, useState } from "react";
import { useState } from "react";
import TimeSlot from "../../components/timeSlot/TimeSlot";
import { useCountdown } from "../../components/CountDownTimer/useCountdown";
import { addDays, min } from "date-fns";
import CountdownTimer from "../../components/CountDownTimer/CountdownTimer";

interface dates {
date: string;
day: string;
}

const TechnicalInterview: React.FC = () => {

const [isDateSet, setDate] = useState<boolean>(false);
const [isTimeSlot, setTimeSlot] = useState<boolean>(false);


const [days, hours, minutes, seconds] = useCountdown(addDays(new Date(), 3));
const [days, hours, minutes, seconds] = useCountdown(new Date('may 6, 2022 07:00:00'));

const getDate = () => {
setTimeSlot(false);
@@ -52,18 +45,11 @@ const TechnicalInterview: React.FC = () => {

<h4>Let's Meet in:</h4>
<div className={styles.timeLeft}>
{/* <h4 className={styles.time}>{`${days} : ${hours} : ${minutes} : ${seconds}`}</h4> */}
<CountdownTimer
days={days}
hours={hours}
minutes={minutes}
seconds={seconds} />
{/* <div className={styles.days}>
<div>Days</div>
<div>Hrs</div>
<div>Mins</div>
<div>Secs</div>
</div> */}
</div>
<h4>Join us on Google Meet</h4>
<div className={styles.icon}>


Notiek ielāde…
Atcelt
Saglabāt