diff --git a/src/Components/HomePage/index.jsx b/src/Components/HomePage/index.jsx index a05cd80..20131c8 100644 --- a/src/Components/HomePage/index.jsx +++ b/src/Components/HomePage/index.jsx @@ -68,6 +68,8 @@ const HomePage = () => { {/* */} + + diff --git a/src/Components/HomePage/style.module.scss b/src/Components/HomePage/style.module.scss index 1ccc8db..e3e3ef5 100644 --- a/src/Components/HomePage/style.module.scss +++ b/src/Components/HomePage/style.module.scss @@ -86,4 +86,4 @@ } .search__descr { margin-right: 25px; -} \ No newline at end of file +} diff --git a/src/components/Home/Home.jsx b/src/components/Home/Home.jsx index 28c557d..3cd193d 100644 --- a/src/components/Home/Home.jsx +++ b/src/components/Home/Home.jsx @@ -2,16 +2,20 @@ import React from 'react'; import './style.css' import styled from 'styled-components'; import { HttpApiMethods } from '../fetchUtils/FetchUtils'; +import {useState} from 'react' import EditForm from '../post/PostForm'; - +import Grid from '@mui/material/Grid'; +import Card from '../Card'; +import Box from '@mui/material/Box'; const httpApiMethods = new HttpApiMethods() const meets = await httpApiMethods.GetMeetings() -const Home = () => { +const Home = () => { + const [count, setCount] = useState(7) function extractDateTime(dateString) { const dateTime = new Date(dateString); const date = dateTime.toLocaleDateString(); @@ -19,26 +23,47 @@ const Home = () => { return { date, time }; } - + const filterMeet = meets.filter( (item, index) => index <= count ) + const allMeets = () => { + setCount(meets.length) + } return ( -
- {Array.isArray(meets) ? ( - meets.map((item, index) => ( -
-
{item.speackerImage}
-
-
{item.tags}
-
{item.type}
+ <> + + + + + {Array.isArray(meets) ? ( + filterMeet.map((item, index) => ( + + + +
+
{item.speackerImage}
+
+
{item.tags}
+
{item.type}
+
+

{item.title}

+

{extractDateTime(item.time).date}, в {extractDateTime(item.time).time} по Московскому времени

-

{item.title}

-

{extractDateTime(item.time).date}, в {extractDateTime(item.time).time} по Московскому времени

-
- )) - ) : ( -

Неверный тип данных с сервера!

- )} - {/* */} -
+ + + + + )) + ) : ( +

Неверный тип данных с сервера!

+ )} + {/* */} + + +
+ +
+ + + ); } diff --git a/src/components/Home/style.css b/src/components/Home/style.css index d918e27..16f8cff 100644 --- a/src/components/Home/style.css +++ b/src/components/Home/style.css @@ -1,6 +1,6 @@ .event_card { width: 292px; - height: 626px; + height: 586px; flex-shrink: 0; margin-top: 100px; margin-right: 11px; @@ -82,4 +82,29 @@ border: 1px solid var(--gray_text, #888); .taggs { display: flex; justify-content: space-between; +} +.allButton { + color: var(--Black_Text, #151515); + text-align: center; + + /* Buttom max */ + font-family: Gilroy; + font-size: 28px; + font-style: normal; + font-weight: 400; + line-height: 125%; /* 35px */ + letter-spacing: -0.84px; + border-radius: 1000px; + border: 1px solid var(--Gray_Line, #D0D2D8); + width: 300px; + height: 60px; + display: flex; + justify-content: center; + align-items: center; + +} +.allButton__container { + display: flex; + justify-content: center; + align-items: center; } \ No newline at end of file