Skip to content

Commit

Permalink
Merge pull request #274 from ita-social-projects/#272-UpdateMainPageL…
Browse files Browse the repository at this point in the history
…ayout

#272 update main page layout
  • Loading branch information
Lvyshnevska authored Oct 23, 2023
2 parents f95c32b + b62e07c commit 62f312d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 9 deletions.
8 changes: 6 additions & 2 deletions FrontEnd/src/components/basicPage/BasicPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function BasicPage() {
>
<Header isAuthorized={auth.isAuth} />
<Routes>
<Route path="/" element={<MainPage />} />
<Route path="/" element={<MainPage isAuthorized={auth.isAuth}/>} />
<Route path="/profile/*" element={<ProfilePage />} />
<Route
path="/profiles/:filter"
Expand All @@ -65,7 +65,11 @@ function BasicPage() {
) : (
<Route path="/login" element={<AuthorizationPage />} />
)}
<Route path="/sign-up" element={<SignUpPage />} />
{auth.isAuth ? (
<Route path="/sign-up" element={<Navigate to="/profile/user-info" />} />
) : (
<Route path="/sign-up" element={<SignUpPage />} />
)}
<Route path="/privacy-policy" element={<PrivacyPolicy />} />
<Route path="/terms-and-conditions" element={<TermsAndConditions />} />
<Route path="/cookies-policy" element={<CookiesPolicyComponent />} />
Expand Down
8 changes: 4 additions & 4 deletions FrontEnd/src/components/landing-page/MainPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import MainAboutSection from './about-section/About';
import CookieMod from '../cookieacception/CookieMod';
import css from './MainPage.module.css';

const MainPage = () => {
const MainPage = (props) => {
const [modalActive, setModalActive] = useState(true);
return (
<div className="main-app">
<div className="main-app-header">
<MainBanner />
<MainBanner isAuthorized={props.isAuthorized}/>
<div className={css['main-app-body']}>
<MainPartners />
<MainCompanies />
<MainLoginBanner />
<MainPartners />
{!props.isAuthorized ? <MainLoginBanner /> : (null)}
<MainAboutSection />
<div>
<CookieMod
Expand Down
11 changes: 8 additions & 3 deletions FrontEnd/src/components/landing-page/banner/Banner.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import './Banner.css';
import Ellipses from '../ellipses/Ellipses';
import { Link } from 'react-router-dom';
import { PropTypes } from 'prop-types';


const MainBanner = () => {
const MainBanner = (props) => {
return (
<div className="main-banner-group">
<div className="main-banner-group__main-rectangle"/>
Expand All @@ -24,14 +25,15 @@ const MainBanner = () => {
<div className="main-banner-group__frame-rectangle13"/>
<div className="main-banner-group__frame-description">
<div className="main-banner-group__banner-text">Це унікальний майданчик <br/>для обміну інформацією і досвідом з тими, хто втілює свої ідеї в життя.</div>
{!props.isAuthorized ?
<div className="main-banner-group__frame-login">
<div className="main-banner-group__login-button">
<Link className="main-banner-group__login-button-text" to="/login">Увійти</Link>
</div>
<div className="main-banner-group__register-button">
<Link className="main-banner-group__register-button-text" to="/sign-up">Зареєстуватися</Link>
</div>
</div>
</div> : (null)}
</div>
<div className="main-banner-group__white-ellipses">
<Ellipses type="white" count={7} />
Expand Down Expand Up @@ -85,4 +87,7 @@ const MainBanner = () => {
);
};

export default MainBanner;
export default MainBanner;

MainBanner.propTypes = {
isAuthorized: PropTypes.bool.isRequired};
2 changes: 2 additions & 0 deletions FrontEnd/src/components/landing-page/partners/Partners.css
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
display: flex;
align-items: flex-start;
gap: 12px;
z-index: 1;
}
.partners-section__navi-icon {
display: flex;
Expand All @@ -43,6 +44,7 @@
flex-shrink: 0;
}
.partners-section__images {
height: 70px;
display: flex;
justify-content: center;
align-items: center;
Expand Down

0 comments on commit 62f312d

Please sign in to comment.