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

Add alt text to back button #465

Merged
merged 4 commits into from
Oct 30, 2023
Merged
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
15 changes: 14 additions & 1 deletion frontend/src/components/UserDetail/EmployeeDetail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,11 @@ const Header = () => {
}}
className={styles.header}
>
<img className={styles.chevronLeft} src={chevronLeft} />
<img
className={styles.chevronLeft}
src={chevronLeft}
alt="Back to Employees List"
/>
Employees
</Link>
</div>
Expand All @@ -162,6 +166,15 @@ const EmployeeDetail = () => {
const [rideCount, setRideCount] = useState(-1);
const [workingHours, setWorkingHours] = useState(-1);

/**
* Compares ride [a] with ride [b] based on their start time. Returns a
* negative number if [a] starts before [b], a positive number if [a] starts
* after [b], and 0 otherwise
*
* @param a the first ride to compare
* @param b the second ride to compare
* @returns -1, 1, or 0 if the start time of [a] is before, after, or the same as [b]
*/
const compRides = (a: Ride, b: Ride) => {
const x = new Date(a.startTime);
const y = new Date(b.startTime);
Expand Down
Loading