Fixed statistics page
This commit is contained in:
parent
986c0833f7
commit
aba12694bf
@ -4,6 +4,8 @@ import { Link } from "react-router-dom";
|
|||||||
|
|
||||||
import { deleteProject, modalToggle } from "@redux/projectsTrackerSlice";
|
import { deleteProject, modalToggle } from "@redux/projectsTrackerSlice";
|
||||||
|
|
||||||
|
import { copyProjectLink } from "@utils/helper";
|
||||||
|
|
||||||
import { apiRequest } from "@api/request";
|
import { apiRequest } from "@api/request";
|
||||||
|
|
||||||
import { useNotification } from "@hooks/useNotification";
|
import { useNotification } from "@hooks/useNotification";
|
||||||
@ -63,12 +65,6 @@ export const ProjectTiket = ({ project, index }) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function copyProjectLink() {
|
|
||||||
navigator.clipboard.writeText(
|
|
||||||
`https://itguild.info/tracker/project/${project.id}`
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function closeAcceptModal() {
|
function closeAcceptModal() {
|
||||||
setAcceptModalOpen(false);
|
setAcceptModalOpen(false);
|
||||||
}
|
}
|
||||||
@ -120,7 +116,7 @@ export const ProjectTiket = ({ project, index }) => {
|
|||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<img src={link}></img>
|
<img src={link}></img>
|
||||||
<p onClick={copyProjectLink}>ссылка на проект</p>
|
<p onClick={copyProjectLink(project.id)}>ссылка на проект</p>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
@ -4,6 +4,8 @@ import { Link } from "react-router-dom";
|
|||||||
|
|
||||||
import { setToggleTab } from "@redux/projectsTrackerSlice";
|
import { setToggleTab } from "@redux/projectsTrackerSlice";
|
||||||
|
|
||||||
|
import { copyProjectLink } from "@utils/helper";
|
||||||
|
|
||||||
import { Navigation } from "@components/Navigation/Navigation";
|
import { Navigation } from "@components/Navigation/Navigation";
|
||||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||||
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader";
|
||||||
@ -103,7 +105,9 @@ const Statistics = () => {
|
|||||||
<div className="statistics-header__menu">
|
<div className="statistics-header__menu">
|
||||||
<h1>Статистика проекта</h1>
|
<h1>Статистика проекта</h1>
|
||||||
<img src={link} alt="#" />
|
<img src={link} alt="#" />
|
||||||
<span className="return-text">ссылка на проект</span>
|
<span className="return-text" onClick={copyProjectLink("62")}>
|
||||||
|
ссылка на проект
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="statistics-header__return">
|
<div className="statistics-header__return">
|
||||||
|
@ -17,6 +17,16 @@
|
|||||||
transform: rotate(-180deg);
|
transform: rotate(-180deg);
|
||||||
margin-right: 22px;
|
margin-right: 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.4s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline !important;
|
||||||
|
transition: 0.4s;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&__menu {
|
&__menu {
|
||||||
@ -33,6 +43,13 @@
|
|||||||
|
|
||||||
span {
|
span {
|
||||||
margin-left: 17px;
|
margin-left: 17px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: 0.4s;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
transition: 0.4s;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,3 +79,9 @@ export function caseOfNum(number, type) {
|
|||||||
: cases[number % 10 < 5 ? number % 10 : 5]
|
: cases[number % 10 < 5 ? number % 10 : 5]
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function copyProjectLink(projectId) {
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
`https://itguild.info/tracker/project/${projectId}`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user