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

refactored OrganizationDashboard css/ closes #2513 #2593

Merged
35 changes: 0 additions & 35 deletions src/screens/OrganizationDashboard/OrganizationDashboard.module.css

This file was deleted.

17 changes: 10 additions & 7 deletions src/screens/OrganizationDashboard/OrganizationDashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import type {
InterfaceQueryOrganizationsListObject,
InterfaceVolunteerRank,
} from 'utils/interfaces';
import styles from './OrganizationDashboard.module.css';
import styles from 'style/app.module.css';
import { VOLUNTEER_RANKING } from 'GraphQl/Queries/EventVolunteerQueries';

/**
Expand All @@ -41,7 +41,7 @@ import { VOLUNTEER_RANKING } from 'GraphQl/Queries/EventVolunteerQueries';
*
* @returns The rendered component.
*/
function organizationDashboard(): JSX.Element {
function OrganizationDashboard(): JSX.Element {
const { t } = useTranslation('translation', { keyPrefix: 'dashboard' });
const { t: tCommon } = useTranslation('common');
const { t: tErrors } = useTranslation('errors');
Expand Down Expand Up @@ -299,7 +299,7 @@ function organizationDashboard(): JSX.Element {
{t('viewAll')}
</Button>
</div>
<Card.Body className={styles.cardBody}>
<Card.Body className={styles.containerBody}>
{loadingEvent ? (
[...Array(4)].map((_, index) => {
return <CardItemLoading key={`eventLoading_${index}`} />;
Expand Down Expand Up @@ -341,7 +341,7 @@ function organizationDashboard(): JSX.Element {
{t('viewAll')}
</Button>
</div>
<Card.Body className={styles.cardBody}>
<Card.Body className={styles.containerBody}>
{loadingPost ? (
[...Array(4)].map((_, index) => {
return <CardItemLoading key={`postLoading_${index}`} />;
Expand Down Expand Up @@ -392,7 +392,7 @@ function organizationDashboard(): JSX.Element {
</Button>
</div>
<Card.Body
className={styles.cardBody}
className={styles.containerBody}
style={{ height: '150px' }}
>
{loadingOrgData ? (
Expand Down Expand Up @@ -435,7 +435,10 @@ function organizationDashboard(): JSX.Element {
{t('viewAll')}
</Button>
</div>
<Card.Body className={styles.cardBody} style={{ padding: '0px' }}>
<Card.Body
className={styles.containerBody}
style={{ padding: '0px' }}
>
{rankingsLoading ? (
[...Array(3)].map((_, index) => {
return <CardItemLoading key={`rankingLoading_${index}`} />;
Expand Down Expand Up @@ -483,4 +486,4 @@ function organizationDashboard(): JSX.Element {
);
}

export default organizationDashboard;
export default OrganizationDashboard;
40 changes: 39 additions & 1 deletion src/style/app.module.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
:root {
/* Color contrast ratio: 7.5:1 (exceeds WCAG AAA) */
--high-contrast-text: #494949;
/* Color contrast ratio: 9:1 (exceeds WCAG AAA) */
--high-contrast-border: #2c2c2c;
}

Expand Down Expand Up @@ -580,13 +582,49 @@ hr {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 10px;
}

.cardHeader .cardTitle {
font-size: 1.2rem;
font-weight: 600;
}

.containerBody {
min-height: 180px;
padding-top: 0;
max-height: 570px;
overflow-y: auto;
width: 100%;
max-width: min(400px, 90vw);
scrollbar-width: thin;
scrollbar-color: rgba(0, 0, 0, 0.3) transparent;

&::-webkit-scrollbar {
width: thin;
}

&::-webkit-scrollbar-track {
background: transparent;
}

&::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.3);
}
}

.containerBody .emptyContainer {
display: flex;
min-height: 180px;
justify-content: center;
align-items: center;
}

.containerBody .rankings {
aspect-ratio: 1;
border-radius: 50%;
width: 35px;
}

.cardBody {
min-height: 180px;
}
Expand Down
Loading