|
1 | 1 | import AddIcon from '@mui/icons-material/Add'; |
2 | 2 | import RemoveIcon from '@mui/icons-material/Remove'; |
3 | | -import { IconButton, Typography } from '@mui/material'; |
| 3 | +import { IconButton, Tooltip, Typography } from '@mui/material'; |
| 4 | +import InfoIcon from '@mui/icons-material/Info'; |
4 | 5 | import { useTheme } from '@mui/material/styles'; |
5 | 6 | import { Box } from '@mui/system'; |
6 | 7 | import { useEffect, useState } from 'react'; |
@@ -40,9 +41,31 @@ export default function ProgressStepper({ |
40 | 41 | flexDirection="column" |
41 | 42 | sx={{ gridColumn: '1/2' /* userSelect: 'none' */ }} |
42 | 43 | > |
43 | | - <Typography fontSize={12} fontWeight="bold"> |
44 | | - {props.type === 'ANIME' ? 'Episodes:' : 'Chapters:'} |
45 | | - </Typography> |
| 44 | + {props.nextAiringEpisode !== null ? ( |
| 45 | + <Box display="flex" flexDirection="row"> |
| 46 | + <Typography fontSize={12} fontWeight="bold"> |
| 47 | + {props.type === 'ANIME' ? 'Episodes' : 'Chapters'} |
| 48 | + </Typography> |
| 49 | + <Tooltip |
| 50 | + title={ |
| 51 | + props.nextAiringEpisode.episode === 0 |
| 52 | + ? `${props.nextAiringEpisode.episode} episodes aired` |
| 53 | + : `${props.nextAiringEpisode.episode - 1} episodes aired` |
| 54 | + } |
| 55 | + arrow |
| 56 | + placement="top" |
| 57 | + > |
| 58 | + <IconButton size="small" sx={{ padding: 0, ml: 0.5 }}> |
| 59 | + <InfoIcon sx={{ fontSize: '14px' }} /> |
| 60 | + </IconButton> |
| 61 | + </Tooltip> |
| 62 | + </Box> |
| 63 | + ) : ( |
| 64 | + <Typography fontSize={12} fontWeight="bold"> |
| 65 | + {props.type === 'ANIME' ? 'Episodes' : 'Chapters'} |
| 66 | + </Typography> |
| 67 | + )} |
| 68 | + |
46 | 69 | <Box |
47 | 70 | display="flex" |
48 | 71 | flexDirection="row" |
|
0 commit comments