From 9a70756d5043bef0d34131c514e48f06d34db4c0 Mon Sep 17 00:00:00 2001 From: b1ek Date: Wed, 17 May 2023 09:55:02 +1000 Subject: [PATCH] move test components to their folder --- .../src/components/Header/index.jsx | 2 +- .../src/components/PsychTestHeader/index.jsx | 14 ------- .../PsychTest}/PsychTestForm/index.jsx | 4 +- .../PsychTestForm/styles/PsychTestForm.css | 0 .../pages/PsychTest/PsychTestHeader/index.jsx | 37 +++++++++++++++++++ .../styles/PsychTestHeader.css | 0 .../src/pages/PsychTest/index.jsx | 4 +- 7 files changed, 42 insertions(+), 19 deletions(-) delete mode 100644 pairent_frontend_react/src/components/PsychTestHeader/index.jsx rename pairent_frontend_react/src/{components => pages/PsychTest}/PsychTestForm/index.jsx (97%) rename pairent_frontend_react/src/{components => pages/PsychTest}/PsychTestForm/styles/PsychTestForm.css (100%) create mode 100644 pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/index.jsx rename pairent_frontend_react/src/{components => pages/PsychTest}/PsychTestHeader/styles/PsychTestHeader.css (100%) diff --git a/pairent_frontend_react/src/components/Header/index.jsx b/pairent_frontend_react/src/components/Header/index.jsx index ae882f4..145edf9 100644 --- a/pairent_frontend_react/src/components/Header/index.jsx +++ b/pairent_frontend_react/src/components/Header/index.jsx @@ -64,7 +64,7 @@ const Header = function () { - Pairent + Точка. diff --git a/pairent_frontend_react/src/components/PsychTestHeader/index.jsx b/pairent_frontend_react/src/components/PsychTestHeader/index.jsx deleted file mode 100644 index 2318911..0000000 --- a/pairent_frontend_react/src/components/PsychTestHeader/index.jsx +++ /dev/null @@ -1,14 +0,0 @@ -import "./styles/PsychTestHeader.css"; - -const PsychTestHeader = () => { - return ( -
- -

Тест на совместимость

-
- ); -}; - -export default PsychTestHeader; diff --git a/pairent_frontend_react/src/components/PsychTestForm/index.jsx b/pairent_frontend_react/src/pages/PsychTest/PsychTestForm/index.jsx similarity index 97% rename from pairent_frontend_react/src/components/PsychTestForm/index.jsx rename to pairent_frontend_react/src/pages/PsychTest/PsychTestForm/index.jsx index 3e6fb58..b4a3ce6 100644 --- a/pairent_frontend_react/src/components/PsychTestForm/index.jsx +++ b/pairent_frontend_react/src/pages/PsychTest/PsychTestForm/index.jsx @@ -1,6 +1,6 @@ -import PsychTestQuestion from "../PsychTestQuestion"; +import PsychTestQuestion from "../../../components/PsychTestQuestion"; import React, { useState } from "react"; -import PsychTestAddResult from "../../API/PsychTestAddResult"; +import PsychTestAddResult from "../../../API/PsychTestAddResult"; import { useNavigate } from "react-router-dom"; import "./styles/PsychTestForm.css"; diff --git a/pairent_frontend_react/src/components/PsychTestForm/styles/PsychTestForm.css b/pairent_frontend_react/src/pages/PsychTest/PsychTestForm/styles/PsychTestForm.css similarity index 100% rename from pairent_frontend_react/src/components/PsychTestForm/styles/PsychTestForm.css rename to pairent_frontend_react/src/pages/PsychTest/PsychTestForm/styles/PsychTestForm.css diff --git a/pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/index.jsx b/pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/index.jsx new file mode 100644 index 0000000..fc6a364 --- /dev/null +++ b/pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/index.jsx @@ -0,0 +1,37 @@ +import { styled } from "styled-components"; +import "./styles/PsychTestHeader.css"; + +const Header = styled.div` + display: flex; + padding-left: 40px; + padding-top: 14px; + align-items: center; + margin-bottom: 55px; + + & h1 { + font-size: 20pt; + } + & button { + color: #bababa; + font-size: 15px; + width: 180px; + height: 36px; + background-color: white; + border: 1px solid #cccccc; + border-radius: 12px; + margin-right: 13px; + } +`; + +const PsychTestHeader = () => { + return ( +
+ +

Тест на совместимость

+
+ ); +}; + +export default PsychTestHeader; diff --git a/pairent_frontend_react/src/components/PsychTestHeader/styles/PsychTestHeader.css b/pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/styles/PsychTestHeader.css similarity index 100% rename from pairent_frontend_react/src/components/PsychTestHeader/styles/PsychTestHeader.css rename to pairent_frontend_react/src/pages/PsychTest/PsychTestHeader/styles/PsychTestHeader.css diff --git a/pairent_frontend_react/src/pages/PsychTest/index.jsx b/pairent_frontend_react/src/pages/PsychTest/index.jsx index 9661156..87db7b6 100644 --- a/pairent_frontend_react/src/pages/PsychTest/index.jsx +++ b/pairent_frontend_react/src/pages/PsychTest/index.jsx @@ -1,5 +1,5 @@ -import PsychTestForm from "../../components/PsychTestForm"; -import PsychTestHeader from "../../components/PsychTestHeader"; +import PsychTestForm from "./PsychTestForm"; +import PsychTestHeader from "./PsychTestHeader"; const PsychTest = () => { return (