-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* query to fetch minutes per source; * updated endpoint to return only user's active sources; frontend update using sources with minutes endpoint; * added 2x modifier to minutes;
- Loading branch information
Showing
10 changed files
with
159 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
packages/app/src/components/Home/Source/SourceTimeChart.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
import { LinearProgress, Typography, useTheme } from '@mui/material' | ||
import Grid2 from '@mui/material/Unstable_Grid2/Grid2' | ||
|
||
interface SourceTimeChartProps { | ||
color: string | ||
time: string | ||
progress: number | ||
} | ||
|
||
export const SourceTimeChart = ({ | ||
color, | ||
progress, | ||
time, | ||
}: SourceTimeChartProps) => { | ||
const theme = useTheme() | ||
|
||
return ( | ||
<Grid2 | ||
container | ||
justifyContent="space-between" | ||
gap={3} | ||
alignItems="center" | ||
width="100%" | ||
> | ||
<Grid2 sx={{ flex: 1, width: '100%' }}> | ||
<LinearProgress | ||
variant="determinate" | ||
value={progress > 100 ? 100 : progress} | ||
sx={{ | ||
alignSelf: 'center', | ||
width: '100%', | ||
backgroundColor: 'transparent', | ||
height: 12, | ||
'& .MuiLinearProgress-bar': { | ||
bottom: 0, | ||
top: 'auto', | ||
backgroundColor: color, | ||
height: 12, | ||
}, | ||
}} | ||
/> | ||
</Grid2> | ||
<Grid2> | ||
<Typography variant="body1" color={theme.palette.grey[300]}> | ||
{time} | ||
</Typography> | ||
</Grid2> | ||
</Grid2> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters