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 CurrentHourIndicator component to use the global CSS file (app.module.css) instead of a component-specific CSS file (CurrentHourIndicator.module.css). #3404

Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@

> **default**(`props`, `deprecatedLegacyContext`?): `ReactNode`

Defined in: [src/screens/MemberDetail/MemberDetail.tsx:51](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L51)
Defined in: [src/screens/MemberDetail/MemberDetail.tsx:50](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L50)

MemberDetail component is used to display the details of a user.
It also allows the user to update the details. It uses the UPDATE_USER_MUTATION to update the user details.
It uses the USER_DETAILS query to get the user details. It uses the useLocalStorage hook to store the user
details in the local storage.
It uses the USER_DETAILS query to get the user details. It uses the useLocalStorage hook to store the user details in the local storage.

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **getLanguageName**(`code`): `string`

Defined in: [src/screens/MemberDetail/MemberDetail.tsx:752](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L752)
Defined in: [src/screens/MemberDetail/MemberDetail.tsx:742](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L742)

## Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

> **prettyDate**(`param`): `string`

Defined in: [src/screens/MemberDetail/MemberDetail.tsx:742](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L742)
Defined in: [src/screens/MemberDetail/MemberDetail.tsx:732](https://github.com/PalisadoesFoundation/talawa-admin/blob/main/src/screens/MemberDetail/MemberDetail.tsx#L732)

## Parameters

Expand Down

This file was deleted.

11 changes: 7 additions & 4 deletions src/components/CurrentHourIndicator/CurrentHourIndicator.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import styles from './CurrentHourIndicator.module.css';
import styles from '../../style/app.module.css';

/**
* A component that displays an indicator for the current hour.
Expand All @@ -8,9 +8,12 @@ import styles from './CurrentHourIndicator.module.css';
*/
const CurrentHourIndicator = (): JSX.Element => {
return (
<div className={styles.container} data-testid="container">
<div className={styles.round}></div>
<div className={styles.line}></div>
<div
className={styles.currentHourIndicator_container}
data-testid="container"
>
<div className={styles.currentHourIndicator_round}></div>
<div className={styles.currentHourIndicator_line}></div>
</div>
);
};
Expand Down
23 changes: 23 additions & 0 deletions src/style/app.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
/* Red Shades */
--red-delete-bg: #f8d6dc;
--red-delete-text: #ff4d4f;
--current-hour-indicator-color: #ff0000;

/* Yellow/Orange Shades */
--loader-color: #febc59;
Expand Down Expand Up @@ -275,6 +276,28 @@
margin-bottom: 3px;
}

.currentHourIndicator_container {
position: relative;
display: flex;
flex-direction: row;
top: -8px;
left: -9px;
}

.currentHourIndicator_round {
background-color: var(--current-hour-indicator-color);
border-radius: 100%;
width: 15px;
height: 15px;
}

.currentHourIndicator_line {
width: 100%;
height: 1px;
background-color: var(--current-hour-indicator-color);
margin: auto;
}

.sidebar {
z-index: 0;
padding-top: 5px;
Expand Down
Loading