diff --git a/src/helper.js b/src/helper.js index 125dac68..26057185 100644 --- a/src/helper.js +++ b/src/helper.js @@ -1,14 +1,20 @@ export function createMarkup(text) { - return {__html: text.split('

').join('

')} + return {__html: text.split('

').join('

')} } export function transformHtml(text) { - let startHtml = {__html: text.split('

').join('

').split('
')} - startHtml = startHtml.__html.filter((el)=> { - return (el != null && el != "" || el === 0) - }) - const finalHtml = startHtml.map((item) => { - return `

Описание опыта работы

${item.split('

')[0]}

` - }) - return {__html: finalHtml.join('')} + let startHtml = {__html: text.split('

').join('

').split('
')}; + startHtml = startHtml.__html.filter((el) => + el !== null && el !== "" || el === 0 + ); + const finalHtml = startHtml.map((item) => + `
+
+

Описание опыта работы

+ +
+
${item.split('

')[0]}

+
` + ); + return {__html: finalHtml.join('')} } diff --git a/src/pages/FormPage.js b/src/pages/FormPage.js index 1feeec31..07dcfb3f 100644 --- a/src/pages/FormPage.js +++ b/src/pages/FormPage.js @@ -1,6 +1,6 @@ -import React, { useState } from 'react' +import React from 'react' import { useDispatch, useSelector } from 'react-redux' -import { useHistory, useParams, Link } from 'react-router-dom' +import { useHistory, useParams } from 'react-router-dom' import { currentCandidate, selectCurrentCandidate, @@ -22,14 +22,14 @@ import { getRole } from '../redux/roleSlice' const goBack = (history) => { history.goBack() -} +}; const FormPage = () => { - const params = useParams() - const history = useHistory() - const dispatch = useDispatch() - const candidate = useSelector(selectCurrentCandidate) - const role = useSelector(getRole) + const params = useParams(); + const history = useHistory(); + const dispatch = useDispatch(); + const candidate = useSelector(selectCurrentCandidate); + const role = useSelector(getRole); if (!candidate.id) { fetchGet({ @@ -56,7 +56,7 @@ const FormPage = () => {
- + candidate avatar
@@ -66,7 +66,7 @@ const FormPage = () => {
- + rectangle Выбранный кандидат
@@ -84,7 +84,7 @@ const FormPage = () => { Заявка на собеседование через телеграм
- +
@@ -94,6 +94,6 @@ const FormPage = () => { ) -} +}; export default FormPage diff --git a/src/pages/SingleReportPage.js b/src/pages/SingleReportPage.js index c79ebe3b..f721a0fa 100644 --- a/src/pages/SingleReportPage.js +++ b/src/pages/SingleReportPage.js @@ -22,7 +22,7 @@ const tasks = [ text: 'Задача «83 – Навигационная система – Поиск по почтовому индексу – Добавить экран поиска по почтовому индексу» не может быть завершена, т.к. работа над задачей «82 – Навигационная система – Разработать модуль поиска по почтовому индексу» ещё не начата', hours: 3 } -] +]; const SingleReportPage = () => { return ( @@ -30,7 +30,7 @@ const SingleReportPage = () => {
- + arrowLeft
Вернуться к списку @@ -103,6 +103,6 @@ const SingleReportPage = () => {
) -} +}; export default SingleReportPage diff --git a/src/pages/Summary.js b/src/pages/Summary.js index cb3694a2..d9fbd30a 100644 --- a/src/pages/Summary.js +++ b/src/pages/Summary.js @@ -1,9 +1,9 @@ import React, {useEffect, useState} from 'react'; -import { ProfileHeader } from "../components/Profile/ProfileHeader"; +import {ProfileHeader} from "../components/Profile/ProfileHeader"; import {getProfileInfo} from "../redux/outstaffingSlice"; -import { useSelector } from "react-redux"; +import {useSelector} from "react-redux"; import {transformHtml} from "../helper"; -import { Footer } from '../components/Footer/Footer' +import {Footer} from '../components/Footer/Footer' import arrow from "../images/right-arrow.png"; import rightArrow from "../images/arrowRight.png" @@ -13,16 +13,16 @@ import '../components/Profile/summary.scss' import {fetchGet} from "../server/server"; export const Summary = () => { - const profileInfo = useSelector(getProfileInfo) + const profileInfo = useSelector(getProfileInfo); const [openGit, setOpenGit] = useState(false); - const [gitInfo, setGitInfo] = useState([]) + const [gitInfo, setGitInfo] = useState([]); useEffect(() => { fetchGet({ link: `${process.env.REACT_APP_API_URL}/api/profile/portfolio-projects?card_id=${localStorage.getItem('cardId')}`, }).then((responseGit) => { setGitInfo(responseGit) }) - }, []) + }, []); return(
@@ -35,7 +35,7 @@ export const Summary = () => {
}
- + avatar

{profileInfo.fio} {profileInfo.specification}

{!openGit && @@ -80,11 +80,11 @@ export const Summary = () => {
- +

{itemGit.main_stack}

- + arrowRight @@ -97,5 +97,5 @@ export const Summary = () => {