Преглед изворни кода

hardcoded countdown date

develop
Ajay_S пре 3 година
родитељ
комит
56b29ef525
2 измењених фајлова са 11 додато и 19 уклоњено
  1. +9
    -3
      src/pages/finalInterview/FinalInterview.tsx
  2. +2
    -16
      src/pages/technicalInterview/TechnicalInterview.tsx

+ 9
- 3
src/pages/finalInterview/FinalInterview.tsx Прегледај датотеку

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


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


const [isDateSet, setDate] = useState<boolean>(false); const [isDateSet, setDate] = useState<boolean>(false);
const [isTimeSlot, setTimeSlot] = 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 = () => { const getDate = () => {
setTimeSlot(false); setTimeSlot(false);
@@ -45,13 +46,18 @@ const FinalInterview: React.FC = () => {


<h4>Let's Meet in:</h4> <h4>Let's Meet in:</h4>
<div className={styles.timeLeft}> <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 className={styles.days}>
<div>Days</div> <div>Days</div>
<div>Hrs</div> <div>Hrs</div>
<div>Mins</div> <div>Mins</div>
<div>Secs</div> <div>Secs</div>
</div>
</div> */}
<CountdownTimer
days={days}
hours={hours}
minutes={minutes}
seconds={seconds} />
</div> </div>
<h4>Join us on Google Meet</h4> <h4>Join us on Google Meet</h4>
<div className={styles.icon}> <div className={styles.icon}>


+ 2
- 16
src/pages/technicalInterview/TechnicalInterview.tsx Прегледај датотеку

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


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

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


const [isDateSet, setDate] = useState<boolean>(false); const [isDateSet, setDate] = useState<boolean>(false);
const [isTimeSlot, setTimeSlot] = 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 = () => { const getDate = () => {
setTimeSlot(false); setTimeSlot(false);
@@ -52,18 +45,11 @@ const TechnicalInterview: React.FC = () => {


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


Loading…
Откажи
Сачувај