Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:ita-social-projects/Forum into #…
Browse files Browse the repository at this point in the history
…792CorrectTheTextInTheAboutUsSection
  • Loading branch information
ohorodnykostap committed Sep 27, 2024
2 parents ceb36db + cdf98a7 commit 33bb58e
Show file tree
Hide file tree
Showing 244 changed files with 167 additions and 159 deletions.
4 changes: 2 additions & 2 deletions BackEnd/profiles/fixtures/activities.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
pk: 4
fields:
name: HORECA
model: profiles.activity
- model: profiles.activity
pk: 5
fields:
name: Інші послуги
name: Інші послуги
25 changes: 2 additions & 23 deletions FrontEnd/src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,30 +1,9 @@
import React from 'react';
import './App.css';
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
import AdminPage from './components/adminPage/AdminPage';
import BasicPage from './components/basicPage/BasicPage';
import { AuthProvider } from './context';
import { RouterProvider } from 'react-router-dom';
import router from './routes/Router';

function App() {
const router = createBrowserRouter([
{
path: '/*',
element: (
<AuthProvider>
<BasicPage />
</AuthProvider>
),
},
{
path: '/customadmin/*',
element: (
<AuthProvider>
<AdminPage />
</AuthProvider>
),
},
]);

return (
<div className="App">
<h1>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen, cleanup } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';

import CompanyCard from '../components/CompanyCard/CompanyCard';
import CompanyCard from '../CompanyCard';

const mockedUser = {
email: 'test@test.com',
Expand All @@ -10,7 +10,7 @@ const mockedUser = {
profile_id: 1,
surname: 'Test',
};
jest.mock('../hooks/useAuth', () => ({
jest.mock('../../../hooks/useAuth', () => ({
useAuth: () => {
return mockedUser;
},
Expand Down
4 changes: 2 additions & 2 deletions FrontEnd/src/components/Contact/Contact.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import renderContent from '../CookiesPolicyPage/RenderContent.jsx';
import LinkContainer from '../CookiesPolicyPage/LinkContainer.jsx';
import renderContent from '../../pages/CookiesPolicyPage/RenderContent.jsx';
import LinkContainer from '../../pages/CookiesPolicyPage/LinkContainer.jsx';
import styles from './Contact.module.css';
import contactText from './text';
import TEXT_CONTENT from './text';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const CookieMod = ({ active, setActive }) => {
про кукі-файли
</Link>
}

</p>
{detailsVisible && (
<div className={styles['cookie-details']}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { render, screen, cleanup } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';

import CookieMod from '../components/cookieacception/CookieMod';
import CookieMod from '../CookieMod';

afterEach(cleanup);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import FooterTop from './top/FooterTop';
import FooterBottom from './bottom/FooterBottom';
import ShortFooter from './short/ShortFooter';
import FooterTop from './Top/FooterTop';
import FooterBottom from './Bottom/FooterBottom';
import ShortFooter from './Short/ShortFooter';
import css from './Footer.module.css';

const UNSUITABLE_PAGES = ['login', 'register'];
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { HashLink } from 'react-router-hash-link';
import { Link } from 'react-router-dom';
import axios from 'axios';
import css from './FooterNavigation.module.css';
import useScrollToTop from '../../../../hooks/useScrollToTop';
import useScrollToTop from '../../../hooks/useScrollToTop';

const PAGE_NAVIGATION_LINKS = [
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import css from './Header.module.css';
import HeaderMenu from './menu/HeaderMenu';
import Navbar from './navbar/Navbar';
import HeaderMenu from './Menu/HeaderMenu';
import Navbar from './Navbar/Navbar';

function Header(props) {
return (
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Link, useNavigate } from 'react-router-dom';
import axios from 'axios';
import { useAuth } from '../../../../hooks';
import { useAuth } from '../../../hooks';

import DropdownMenu from './DropdownMenu';
import css from './Profile.module.css';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import axios from 'axios';
import{ useState, useEffect } from 'react';
import { useParams, useSearchParams } from 'react-router-dom';
import MainPage from '../landing-page/MainPage';
import MyModal from '../ProfilePage/UI/MyModal/MyModal';
import MainPage from '../../pages/LandingPage/MainPage';
import MyModal from '../../pages/ProfilePage/UI/MyModal/MyModal';
import classes from './ModerationModal.module.css';

export function ModerationModal() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styles from './TermsAndConditionsComponent.module.css';
import TermsAndConditionsText from './text';
import TEXT_CONTENT from './text';
import LinkContainer from '../../CookiesPolicyPage/LinkContainer.jsx';
import renderContent from '../../CookiesPolicyPage/RenderContent.jsx';
import LinkContainer from '../../../pages/CookiesPolicyPage/LinkContainer.jsx';
import renderContent from '../../../pages/CookiesPolicyPage/RenderContent.jsx';
import useScrollToTop from '../../../hooks/useScrollToTop';


Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Login from '../authorization/Login';
import Login from './Login';
import classes from './AuthorizationPage.module.css';

const AuthorizationPage = () => {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import validator from 'validator';
import EyeVisible from './EyeVisible';
import EyeInvisible from './EyeInvisible';
import classes from './LoginPage.module.css';
import { useAuth } from '../../hooks/';
import checkIfStaff from '../adminPage/checkIfStaff';
import { useAuth } from '../../hooks';
import checkIfStaff from '../AdminPage/checkIfStaff';

const LoginContent = () => {
const { login } = useAuth();
Expand Down Expand Up @@ -57,13 +57,14 @@ const LoginContent = () => {
errorMessage = errors.password.message;
} else if (errors.unspecifiedError?.message) {
errorMessage = errors.unspecifiedError.message;
toast.error(errorMessage);
} else if (errors.rateError?.message) {
errorMessage = errors.rateError.message;
toast.error(errorMessage);
} else if (errors.blockedUserError?.message) {
errorMessage = errors.blockedUserError.message;
toast.error(errorMessage);
}

errorMessage && toast.error(errorMessage);
}, [
errors.email?.message,
errors.password?.message,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import './About.css';
import React from 'react';
import AboutSectionCards from './cards/AboutCards';
import AboutSectionText from './about-text/AboutText';
import AboutSectionCards from './Cards/AboutCards';
import AboutSectionText from './AboutText/AboutText';
import AboutTextContent from './AboutMainText.js';

const MainAboutSection = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import axios from 'axios';
import { useState, useEffect } from 'react';
import styles from './Companies.module.css';
import CompanyCard from '../../CompanyCard/CompanyCard';
import CompanyCard from '../../../components/CompanyCard/CompanyCard';
import PropTypes from 'prop-types';
import useSWR from 'swr';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { render, screen } from '@testing-library/react';
import { MemoryRouter } from 'react-router-dom';
import MainCompanies from '../components/landing-page/companies/Companies';
import MainCompanies from '../Companies';

afterEach(() => {
jest.resetAllMocks();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useState } from 'react';
import MainBanner from './banner/Banner';
import MainBanner from './Banner/Banner';
// import MainPartners from './partners/Partners';
import MainCompanies from './companies/Companies';
import MainLoginBanner from './login-banner/LoginBanner';
import MainAboutSection from './about-section/About';
import CookieMod from '../cookieacception/CookieMod';
import MainCompanies from './Companies/Companies';
import MainLoginBanner from './LoginBanner/LoginBanner';
import MainAboutSection from './AboutSection/About';
import CookieMod from '../../components/CookieAcception/CookieMod';
import css from './MainPage.module.css';
import PropTypes from 'prop-types';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import classNames from 'classnames';
import { useAuth } from '../../../hooks';
import DefaultLogo from './DefaultLogo';
import classes from './TitleInfo.module.css';
import CategoryBadges from '../../MiniComponents/CategoryBadges';
import StarForLike from '../../MiniComponents/StarForLike';
import CategoryBadges from '../../../components/MiniComponents/CategoryBadges';
import StarForLike from '../../../components/MiniComponents/StarForLike';

function TitleInfo({ isAuthorized, data }) {
const { user } = useAuth();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ import { useState } from 'react';
import { useParams } from 'react-router-dom';
import { PropTypes } from 'prop-types';

import Loader from '../loader/Loader';
import ErrorPage404 from '../errorPages/ErrorPage404';
import Loader from '../../components/Loader/Loader';
import ErrorPage404 from '../../pages/ErrorPages/ErrorPage404';
import MainInfoSection from './MainInfo/MainInfoSection';
import DetailedInfoSection from './DetailedInfo/DetailedInfoSection';
import BannerImage from './BannerImage';
import { ActiveLinksContext } from '../../context/ActiveLinksContext';
import classes from './ProfileDetailPage.module.css';
import PendingStatus from '../MiniComponents/PendingModerationIcon/PendingStatus';
import PendingStatus from '../../components/MiniComponents/PendingModerationIcon/PendingStatus';

function ProfileDetailPage({ isAuthorized }) {
const [activeLinks, setActiveLinks] = useState([]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { PropTypes } from 'prop-types';
import { useAuth } from '../../hooks';
import css from './ProfileCard.module.css';
import axios from 'axios';
import CategoryBadges from '../MiniComponents/CategoryBadges';
import StarForLike from '../MiniComponents/StarForLike';
import BellForUpdates from '../MiniComponents/BellForUpdates';
import CategoryBadges from '../../components/MiniComponents/CategoryBadges';
import StarForLike from '../../components/MiniComponents/StarForLike';
import BellForUpdates from '../../components/MiniComponents/BellForUpdates';

const { Paragraph } = Typography;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import axios from 'axios';
import { Radio } from 'antd';
import useSWR from 'swr';

import ErrorPage404 from '../errorPages/ErrorPage404';
import Loader from '../loader/Loader';
import ErrorPage404 from '../ErrorPages/ErrorPage404';
import Loader from '../../components/Loader/Loader';
import ProfileList from './ProfileList';

import css from './ProfileListPage.module.css';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import checkFormIsDirty from '../../../utils/checkFormIsDirty';
import defineChanges from '../../../utils/defineChanges';
import { useAuth, useProfile } from '../../../hooks';
import HalfFormField from './FormFields/HalfFormField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './FormComponents.module.css';

const LABELS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { useContext } from 'react';
import { useForm } from 'react-hook-form';
import { DirtyFormContext } from '../../../context/DirtyFormContext';
import PasswordField from './FormFields/PasswordField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './ChangePassword.module.css';

export default function ChangePassword(props) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import defineChanges from '../../../utils/defineChanges';
import { formatPhoneNumber } from '../../../utils/formatPhoneNumber';
import FullField from './FormFields/FullField';
import HalfFormField from './FormFields/HalfFormField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './FormComponents.module.css';
import { useMask } from '@react-input/mask';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import classNames from 'classnames';
import preventEnterSubmit from '../../../../utils/preventEnterSubmit';
import css from './ImageField.module.css';
import PendingStatus from '../../../MiniComponents/PendingModerationIcon/PendingStatus';
import PendingStatus from '../../../../components/MiniComponents/PendingModerationIcon/PendingStatus';

const ImageField = ({
name,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react';
import { PropTypes } from 'prop-types';
import EyeInvisible from '../../../authorization/EyeInvisible';
import EyeVisible from '../../../authorization/EyeVisible';
import EyeInvisible from '../../../Authorization/EyeInvisible';
import EyeVisible from '../../../Authorization/EyeVisible';
import preventEnterSubmit from '../../../../utils/preventEnterSubmit';
import css from './PasswordField.module.css';
import { PASSWORD_PATTERN } from '../../../../constants/constants';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import HalfFormField from './FormFields/HalfFormField';
import ImageField from './FormFields/ImageField';
import MultipleSelectChip from './FormFields/MultipleSelectChip';
import TextField from './FormFields/TextField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import validateEdrpou from '../../../utils/validateEdrpou';
import validateRnokpp from '../../../utils/validateRnokpp';
import BanerModeration from './BanerModeration';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import checkFormIsDirty from '../../../utils/checkFormIsDirty';
import defineChanges from '../../../utils/defineChanges';
import { useAuth, useProfile } from '../../../hooks';
import TextField from './FormFields/TextField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './FormComponents.module.css';

const LABELS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import checkFormIsDirty from '../../../utils/checkFormIsDirty';
import defineChanges from '../../../utils/defineChanges';
import { useAuth, useProfile } from '../../../hooks';
import TextField from './FormFields/TextField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './FormComponents.module.css';

const LABELS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useAuth, useProfile } from '../../../hooks';
import checkFormIsDirty from '../../../utils/checkFormIsDirty';
import defineChanges from '../../../utils/defineChanges';
import HalfFormField from './FormFields/HalfFormField';
import Loader from '../../loader/Loader';
import Loader from '../../../components/Loader/Loader';
import css from './FormComponents.module.css';

const LABELS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import css from './ProfilePage.module.css';
import Description from './ProfilePageComponents/Description';
import ProfileContent from './ProfilePageComponents/ProfileContent';
import { useState } from 'react';
import BreadCrumbs from '../BreadCrumbs/BreadCrumbs';
import Loader from '../loader/Loader';
import BreadCrumbs from '../../components/BreadCrumbs/BreadCrumbs';
import Loader from '../../components/Loader/Loader';
import { useAuth, useProfile } from '../../hooks';

const ProfilePage = () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from 'react';
import { Link } from 'react-router-dom';
import { RestorePasswordFormContentComponent } from './restorepassword-form/RestorePasswordFormContent';
import { RestorePasswordFormContentComponent } from './RestorePasswordForm/RestorePasswordFormContent';
import styles from './RestorePasswordForm.module.css';


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { useNavigate } from 'react-router-dom';
import { useParams } from 'react-router-dom';
import { PropTypes } from 'prop-types';
import { PASSWORD_PATTERN } from '../../../../../constants/constants';
import EyeInvisible from '../../../../authorization/EyeInvisible';
import EyeVisible from '../../../../authorization/EyeVisible';
import EyeInvisible from '../../../../Authorization/EyeInvisible';
import EyeVisible from '../../../../Authorization/EyeVisible';
import styles from './RestorePasswordFormContent.module.css';

export function RestorePasswordFormContentComponent({ setIsValid }) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styles from './SendEmailForm.module.css';
import { SendEmailRestorePasswordFormContentComponent } from './restorepassword-form/EmailFormContent';
import { SendEmailRestorePasswordFormContentComponent } from './RestorePasswordForm/EmailFormContent';
import { useState } from 'react';
import { Link } from 'react-router-dom';

Expand Down
Loading

0 comments on commit 33bb58e

Please sign in to comment.