/
SOFG1
/
generic
Обзор
Документация
Войти
/
SOFG1
/
generic
Код
Запросы
0
Задачи
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/views/StatsViews/GraphicsView.tsx
45 строк
1 KB
Eddy
initial commit
22 июл 2024, 17:06
22 июл 2024, 17:06
a72fa2b
Код
Авторство
О чём код?
import React, { useEffect } from "react"; import styled from "styled-components"; import { EngagementRateComponent, PostPreviewComponent, } from "../../components/StatsComponents"; import { desktopBp } from "../../styles/variables"; import { useSMStatsActions } from "../../store/smStats"; import { withErrorBoundaryHOC } from "../../utils/withErrorBoundaryHOC"; const GraphicsViewStyled = styled.div` position: relative; display: flex; align-content: center; align-items: stretch; justify-content: flex-start; gap: 1.61vw; margin-bottom: 1.56vw; @media screen and (max-width: ${desktopBp}) { gap: 20px; margin-bottom: 20px; } @media screen and (max-width: 1050px) { flex-direction: column; } `; const GraphicsView = React.memo(() => { const { onGetPostList, onGetPostViews } = useSMStatsActions() useEffect(() => { onGetPostViews() onGetPostList() }, []) return ( <GraphicsViewStyled> <EngagementRateComponent /> <PostPreviewComponent /> </GraphicsViewStyled> ); }); export default withErrorBoundaryHOC(GraphicsView);