Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper positioning of Event Statistics in the mobile view #1308

Merged
merged 5 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/components/EventStats/EventStats.module.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.stackEvents {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
margin: 10px 20px;
padding: 10px 20px;
overflow: hidden;
gap: 2px;
column-gap: 2px;
}

@media screen and (min-width: 801px) {
.stackEvents {
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
padding: 0 2rem;
margin: 0 40px;
gap: 5px;
column-gap: 4px;
}
}

@media screen and (min-width: 768px) and (max-width: 800px) {
.stackEvents {
flex-direction: row;
justify-content: space-between;
align-items: flex-start;
padding: 0 2rem;
margin: 0 20px;
gap: 5px;
column-gap: 4px;
}
}
16 changes: 7 additions & 9 deletions src/components/EventStats/EventStats.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Modal } from 'react-bootstrap';
import { FeedbackStats } from './Statistics/Feedback';
import { ReviewStats } from './Statistics/Review';
import { AverageRating } from './Statistics/AverageRating';
import Stack from '@mui/material/Stack';
import styles from './Loader.module.css';
import eventStatsStyles from './EventStats.module.css';
import { useQuery } from '@apollo/client';
import { EVENT_FEEDBACKS } from 'GraphQl/Queries/Queries';

Expand Down Expand Up @@ -44,14 +44,12 @@ export const EventStats = ({
<Modal.Header closeButton className="bg-primary">
<Modal.Title className="text-white">Event Statistics</Modal.Title>
</Modal.Header>
<Modal.Body>
<Stack direction="row" spacing={2}>
<FeedbackStats data={data} />
<div>
<ReviewStats data={data} />
<AverageRating data={data} />
</div>
</Stack>
<Modal.Body className={eventStatsStyles.stackEvents}>
<FeedbackStats data={data} />
<div>
<ReviewStats data={data} />
<AverageRating data={data} />
</div>
</Modal.Body>
</Modal>
</>
Expand Down