From 140adb00512fcf013876b81d39f5218492fd4c9a Mon Sep 17 00:00:00 2001 From: Victor Batischev Date: Wed, 14 Feb 2024 19:32:13 +0300 Subject: [PATCH] pages rename --- src/{App.js => App.jsx} | 0 .../ProjectTicket/ProjectTicket.jsx | 2 +- .../AuthForCandidate/AuthForCandidate.jsx | 2 +- ...nerAddRequest.js => PartnerAddRequest.jsx} | 0 ...rtnerEmployees.js => PartnerEmployees.jsx} | 0 ...PartnerTreaties.js => PartnerTreaties.jsx} | 0 src/pages/Payouts/{Payouts.js => Payouts.jsx} | 3 + src/pages/Profile/{Profile.js => Profile.jsx} | 0 ...ofileCandidate.js => ProfileCandidate.jsx} | 0 .../{ProjectTracker.js => ProjectTracker.jsx} | 0 .../{PassingTests.js => PassingTests.jsx} | 0 src/pages/Quiz/{QuizPage.js => QuizPage.jsx} | 0 .../{QuizReportPage.js => QuizReportPage.jsx} | 0 ...didate.js => RegistrationForCandidate.jsx} | 0 ...tionSetting.js => RegistrationSetting.jsx} | 0 ...ngleReportPage.js => SingleReportPage.jsx} | 0 src/pages/Statistics/Statistics.jsx | 5 +- src/pages/Summary/{Summary.js => Summary.jsx} | 0 .../{TrackerAuth.js => TrackerAuth.jsx} | 0 .../{TrackerIntro.js => TrackerIntro.jsx} | 0 ...egistration.js => TrackerRegistration.jsx} | 0 src/utils/helper.js | 55 +++++++++---------- 22 files changed, 36 insertions(+), 31 deletions(-) rename src/{App.js => App.jsx} (100%) rename src/pages/PartnerAddRequest/{PartnerAddRequest.js => PartnerAddRequest.jsx} (100%) rename src/pages/PartnerEmployees/{PartnerEmployees.js => PartnerEmployees.jsx} (100%) rename src/pages/PartnerTreaties/{PartnerTreaties.js => PartnerTreaties.jsx} (100%) rename src/pages/Payouts/{Payouts.js => Payouts.jsx} (72%) rename src/pages/Profile/{Profile.js => Profile.jsx} (100%) rename src/pages/ProfileCandidate/{ProfileCandidate.js => ProfileCandidate.jsx} (100%) rename src/pages/ProjectTracker/{ProjectTracker.js => ProjectTracker.jsx} (100%) rename src/pages/Quiz/{PassingTests.js => PassingTests.jsx} (100%) rename src/pages/Quiz/{QuizPage.js => QuizPage.jsx} (100%) rename src/pages/Quiz/{QuizReportPage.js => QuizReportPage.jsx} (100%) rename src/pages/RegistrationForCandidate/{RegistrationForCandidate.js => RegistrationForCandidate.jsx} (100%) rename src/pages/RegistrationSetting/{RegistrationSetting.js => RegistrationSetting.jsx} (100%) rename src/pages/SingleReportPage/{SingleReportPage.js => SingleReportPage.jsx} (100%) rename src/pages/Summary/{Summary.js => Summary.jsx} (100%) rename src/pages/TrackerAuth/{TrackerAuth.js => TrackerAuth.jsx} (100%) rename src/pages/TrackerIntro/{TrackerIntro.js => TrackerIntro.jsx} (100%) rename src/pages/TrackerRegistration/{TrackerRegistration.js => TrackerRegistration.jsx} (100%) diff --git a/src/App.js b/src/App.jsx similarity index 100% rename from src/App.js rename to src/App.jsx diff --git a/src/components/ProjectTicket/ProjectTicket.jsx b/src/components/ProjectTicket/ProjectTicket.jsx index 47f45de3..18424541 100644 --- a/src/components/ProjectTicket/ProjectTicket.jsx +++ b/src/components/ProjectTicket/ProjectTicket.jsx @@ -135,7 +135,7 @@ export const ProjectTicket = ({ project, index }) => {

редактировать

-
+
copyProjectLink(project.id)}>

скопировать ссылку

diff --git a/src/pages/AuthForCandidate/AuthForCandidate.jsx b/src/pages/AuthForCandidate/AuthForCandidate.jsx index fa359a6e..4957bca6 100644 --- a/src/pages/AuthForCandidate/AuthForCandidate.jsx +++ b/src/pages/AuthForCandidate/AuthForCandidate.jsx @@ -115,7 +115,7 @@ export const AuthForCandidate = () => { resetModal={setModalReset} title="Войти, если есть доступ" description="Если вы получили доступ, пройдя - 2 шага для входа или хотите узнать + 2 шага для входа, или хотите узнать свои результаты в кабинете" />
diff --git a/src/pages/PartnerAddRequest/PartnerAddRequest.js b/src/pages/PartnerAddRequest/PartnerAddRequest.jsx similarity index 100% rename from src/pages/PartnerAddRequest/PartnerAddRequest.js rename to src/pages/PartnerAddRequest/PartnerAddRequest.jsx diff --git a/src/pages/PartnerEmployees/PartnerEmployees.js b/src/pages/PartnerEmployees/PartnerEmployees.jsx similarity index 100% rename from src/pages/PartnerEmployees/PartnerEmployees.js rename to src/pages/PartnerEmployees/PartnerEmployees.jsx diff --git a/src/pages/PartnerTreaties/PartnerTreaties.js b/src/pages/PartnerTreaties/PartnerTreaties.jsx similarity index 100% rename from src/pages/PartnerTreaties/PartnerTreaties.js rename to src/pages/PartnerTreaties/PartnerTreaties.jsx diff --git a/src/pages/Payouts/Payouts.js b/src/pages/Payouts/Payouts.jsx similarity index 72% rename from src/pages/Payouts/Payouts.js rename to src/pages/Payouts/Payouts.jsx index 2ab1afdd..d6d8db93 100644 --- a/src/pages/Payouts/Payouts.js +++ b/src/pages/Payouts/Payouts.jsx @@ -2,12 +2,15 @@ import React from "react"; import { Navigation } from "@components/Navigation/Navigation"; import { ProfileHeader } from "@components/ProfileHeader/ProfileHeader"; +import { Footer } from "@components/common/Footer/Footer"; export const Payouts = () => { return (
+
+
); }; diff --git a/src/pages/Profile/Profile.js b/src/pages/Profile/Profile.jsx similarity index 100% rename from src/pages/Profile/Profile.js rename to src/pages/Profile/Profile.jsx diff --git a/src/pages/ProfileCandidate/ProfileCandidate.js b/src/pages/ProfileCandidate/ProfileCandidate.jsx similarity index 100% rename from src/pages/ProfileCandidate/ProfileCandidate.js rename to src/pages/ProfileCandidate/ProfileCandidate.jsx diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.jsx similarity index 100% rename from src/pages/ProjectTracker/ProjectTracker.js rename to src/pages/ProjectTracker/ProjectTracker.jsx diff --git a/src/pages/Quiz/PassingTests.js b/src/pages/Quiz/PassingTests.jsx similarity index 100% rename from src/pages/Quiz/PassingTests.js rename to src/pages/Quiz/PassingTests.jsx diff --git a/src/pages/Quiz/QuizPage.js b/src/pages/Quiz/QuizPage.jsx similarity index 100% rename from src/pages/Quiz/QuizPage.js rename to src/pages/Quiz/QuizPage.jsx diff --git a/src/pages/Quiz/QuizReportPage.js b/src/pages/Quiz/QuizReportPage.jsx similarity index 100% rename from src/pages/Quiz/QuizReportPage.js rename to src/pages/Quiz/QuizReportPage.jsx diff --git a/src/pages/RegistrationForCandidate/RegistrationForCandidate.js b/src/pages/RegistrationForCandidate/RegistrationForCandidate.jsx similarity index 100% rename from src/pages/RegistrationForCandidate/RegistrationForCandidate.js rename to src/pages/RegistrationForCandidate/RegistrationForCandidate.jsx diff --git a/src/pages/RegistrationSetting/RegistrationSetting.js b/src/pages/RegistrationSetting/RegistrationSetting.jsx similarity index 100% rename from src/pages/RegistrationSetting/RegistrationSetting.js rename to src/pages/RegistrationSetting/RegistrationSetting.jsx diff --git a/src/pages/SingleReportPage/SingleReportPage.js b/src/pages/SingleReportPage/SingleReportPage.jsx similarity index 100% rename from src/pages/SingleReportPage/SingleReportPage.js rename to src/pages/SingleReportPage/SingleReportPage.jsx diff --git a/src/pages/Statistics/Statistics.jsx b/src/pages/Statistics/Statistics.jsx index 7699d1b4..233a96ad 100644 --- a/src/pages/Statistics/Statistics.jsx +++ b/src/pages/Statistics/Statistics.jsx @@ -105,7 +105,10 @@ const Statistics = () => {

Статистика проекта

# - + copyProjectLink("62")} + > ссылка на проект
diff --git a/src/pages/Summary/Summary.js b/src/pages/Summary/Summary.jsx similarity index 100% rename from src/pages/Summary/Summary.js rename to src/pages/Summary/Summary.jsx diff --git a/src/pages/TrackerAuth/TrackerAuth.js b/src/pages/TrackerAuth/TrackerAuth.jsx similarity index 100% rename from src/pages/TrackerAuth/TrackerAuth.js rename to src/pages/TrackerAuth/TrackerAuth.jsx diff --git a/src/pages/TrackerIntro/TrackerIntro.js b/src/pages/TrackerIntro/TrackerIntro.jsx similarity index 100% rename from src/pages/TrackerIntro/TrackerIntro.js rename to src/pages/TrackerIntro/TrackerIntro.jsx diff --git a/src/pages/TrackerRegistration/TrackerRegistration.js b/src/pages/TrackerRegistration/TrackerRegistration.jsx similarity index 100% rename from src/pages/TrackerRegistration/TrackerRegistration.js rename to src/pages/TrackerRegistration/TrackerRegistration.jsx diff --git a/src/utils/helper.js b/src/utils/helper.js index 5c228457..6ed6d29b 100644 --- a/src/utils/helper.js +++ b/src/utils/helper.js @@ -2,34 +2,33 @@ export function createMarkup(text) { return { __html: text.split("

").join("

") }; } -// export function transformHtml(text) { -// 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("") }; -// } -// -// export const setToken = () => { -// const url = new URL(window.location.href); -// const urlT = url.searchParams.get("token"); -// urlT ? sessionStorage.setItem('token', 'Bearer ' + urlT) : ''; -// const tParam = urlT || sessionStorage.getItem('token'); -// return tParam ? {"Authorization": tParam} : false -// -// }; +export function transformHtml(text) { + 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("") }; +} + +export const setToken = () => { + const url = new URL(window.location.href); + const urlT = url.searchParams.get("token"); + urlT ? sessionStorage.setItem("token", "Bearer " + urlT) : ""; + const tParam = urlT || sessionStorage.getItem("token"); + return tParam ? { Authorization: tParam } : false; +}; export const getToken = () => { const tParam = `Bearer ${localStorage.getItem("auth_token")}`;