Add Cards in Profile
This commit is contained in:
@ -10,7 +10,7 @@ export const CardControl = ({ title, path, description, img }) => {
|
||||
<Link to={`/${path}`} className="control-card">
|
||||
<div className="control-card__about">
|
||||
<img src={img} alt="itemImg" />
|
||||
<h3>{title}</h3>
|
||||
<h3 dangerouslySetInnerHTML={{ __html: title }}></h3>
|
||||
</div>
|
||||
<div className="control-card__info">
|
||||
<p dangerouslySetInnerHTML={{ __html: description }}></p>
|
||||
|
@ -38,7 +38,7 @@
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
line-height: 22px;
|
||||
max-width: 125px;
|
||||
max-width: 165px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
|
||||
// const [l, setL] = useState(1);
|
||||
const [calendar, setCalendar] = useState([]);
|
||||
const [month, setMonth] = useState("");
|
||||
const [endDate, setEndDate] = useState(null);
|
||||
@ -174,9 +175,27 @@ export const ProfileCalendarComponent = React.memo(
|
||||
});
|
||||
}
|
||||
|
||||
// function errorr(TotalRangeHours) {
|
||||
// console.error(TotalRangeHours);
|
||||
// function dddd(day) {
|
||||
// let index = day.format("D") - l;
|
||||
// console.log(`d ${day.format("d")}`);
|
||||
// if (day.format("d") != 0 && day.format("d") != 6) {
|
||||
// let elementAtIndex1 = reports[index];
|
||||
// if (elementAtIndex1 && elementAtIndex1.task) {
|
||||
// let totalHoursSpent = elementAtIndex1.task.reduce(
|
||||
// (total, task) => total + task.hours_spent,
|
||||
// 0
|
||||
// );
|
||||
// console.log(`index ${index}`);
|
||||
// console.log(elementAtIndex1);
|
||||
// console.log(`h ${totalHoursSpent}`);
|
||||
// return totalHoursSpent;
|
||||
// }
|
||||
// } else {
|
||||
// setL(l + 1);
|
||||
// console.log(`l ${l}`);
|
||||
// }
|
||||
// }
|
||||
|
||||
return (
|
||||
<div className="calendar-component">
|
||||
<div className="calendar-component__header">
|
||||
@ -265,7 +284,7 @@ export const ProfileCalendarComponent = React.memo(
|
||||
<div className="form-date">{day.format("D")}</div>
|
||||
<div className="form-box">
|
||||
<div className="form-hours">
|
||||
<span>7/Час</span>
|
||||
<span>7/</span>
|
||||
</div>
|
||||
</div>
|
||||
{/* {currentMonthAndDay(day)} */}
|
||||
|
Reference in New Issue
Block a user