Skip to content

Commit

Permalink
user page buttons aligned
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronshiel committed Aug 3, 2023
1 parent 9c2eba2 commit 8063c45
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions client/src/components/users/train-dirty-mentor-button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Permission to use, copy, modify, and distribute this software and its documentat
The full terms of this copyright and license should always be found in the root directory of this software deliverable as "license.txt" and if these terms are not found with this software, please contact the USC Stevens Center for the full license.
*/
import React, { useEffect, useState } from "react";
import { Icon, IconButton, Theme, Tooltip } from "@mui/material";
import { IconButton, Theme, Tooltip } from "@mui/material";
import { trainMentor } from "api";
import { useWithConfig } from "store/slices/config/useWithConfig";
import { makeStyles } from "tss-react/mui";
Expand Down Expand Up @@ -83,16 +83,24 @@ export function TrainDirtyMentorButton(props: {
<span>
{trainStatus === JobState.IN_PROGRESS && localDirty ? (
<Tooltip title="Training In Progress" arrow>
<Icon data-cy="progress-icon" className={styles.normalButton}>
<IconButton
data-cy="progress-icon"
className={styles.normalButton}
style={{ cursor: "default" }}
>
<ProgressIcon className={styles.normalButton} />
</Icon>
</IconButton>
</Tooltip>
) : (trainStatus === JobState.SUCCESS && !localDirty) ||
!localDirty ? (
<Tooltip title="Up To Date" arrow>
<Icon data-cy="success-icon" className={styles.normalButton}>
<IconButton
data-cy="success-icon"
className={styles.normalButton}
style={{ cursor: "default" }}
>
<SuccessIcon style={{ color: "green" }} />
</Icon>
</IconButton>
</Tooltip>
) : (
<Tooltip
Expand All @@ -118,7 +126,7 @@ export function TrainDirtyMentorButton(props: {
});
}}
className={styles.normalButton}
size="large"
style={{ marginRight: 0 }}
>
{dirtyReason === MentorDirtyReason.ANSWERS_ADDED ? (
<NewVideosIcon />
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/users.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,7 @@ function UserItem(props: {
<TableCell data-cy="updatedAt" align="left">
{mentor.updatedAt ? new Date(mentor.updatedAt).toLocaleString() : "N/A"}
</TableCell>
<TableCell data-cy="actions" align="center">
<TableCell data-cy="actions" align="right">
<TrainDirtyMentorButton
mentor={mentor}
accessToken={props.accessToken}
Expand Down

0 comments on commit 8063c45

Please sign in to comment.