import React, { useEffect, useState } from "react"; import { useSelector } from "react-redux"; import { Link, Navigate, useNavigate } from "react-router-dom"; import { selectCurrentCandidate } from "@redux/outstaffingSlice"; import { urlForLocal } from "@utils/helper"; import { Footer } from "@components/Common/Footer/Footer"; import { LogoutButton } from "@components/LogoutButton/LogoutButton"; import rectangle from "assets/images/rectangle_secondPage.png"; import CalendarComponent from "./CalendarComponent"; import "./calendar.scss"; import { currentMonth } from "./calendarHelper"; const Calendar = () => { if (localStorage.getItem("role_status") !== "18") { return ; } const candidateForCalendar = useSelector(selectCurrentCandidate); const [month, setMonth] = useState(""); const navigate = useNavigate(); useEffect(() => { setMonth(currentMonth); }, [month]); const { name, skillsName, photo } = candidateForCalendar; const abbreviatedName = name && name.substring(0, name.lastIndexOf(" ")); return (

Добрый день, Александр !

{photo && ( img )}

{abbreviatedName}

{skillsName} разработчик

img
{ navigate("/report/0"); }} />

{month} : 60 часов

); }; export default Calendar;