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

feat: add podcast list and spotify embedded #369

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Prev Previous commit
fix: podcast pagination
Kanhaiya committed Mar 7, 2023
commit 598396dcba9b42b0c0349b0524331f0ffb0b1a2f
7 changes: 7 additions & 0 deletions client/src/components/podcast/List.js
Original file line number Diff line number Diff line change
@@ -90,11 +90,13 @@ const PodcastList = ({ spotify, pageNo, len, hidePagination }) => {
<div className={classes.pagination}>
<div className={classes.paginationBtn}>
<ChevronLeftIcon
className={nextPageNo == 1 ? classes.btnDisable : ''}
onClick={
nextPageNo != 1 ? () => setNextPageNo(nextPageNo - 1) : null
}
/>
<Typography
className={nextPageNo == 1 ? classes.btnDisable : ''}
onClick={
nextPageNo != 1 ? () => setNextPageNo(nextPageNo - 1) : null
}
@@ -104,11 +106,13 @@ const PodcastList = ({ spotify, pageNo, len, hidePagination }) => {
</div>
<div className={classes.paginationBtn}>
<Typography
className={len == 0 ? classes.btnDisable : ''}
onClick={len != 0 ? () => setNextPageNo(nextPageNo + 1) : null}
>
Next
</Typography>
<ChevronRightIcon
className={len == 0 ? classes.btnDisable : ''}
onClick={len != 0 ? () => setNextPageNo(nextPageNo + 1) : null}
/>
</div>
@@ -120,6 +124,9 @@ const PodcastList = ({ spotify, pageNo, len, hidePagination }) => {
export default PodcastList;

const useStyles = makeStyles((theme) => ({
btnDisable: {
color: theme.palette.text.disabled,
},
pagination: {
'&:hover': {
cursor: 'pointer',
2 changes: 1 addition & 1 deletion client/src/pages/expressions/podcasts/[pageNumber].jsx
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ const PodcastPage = ({ spotify, isError, pageNumber, isNextNull }) => {
const handleChange = (value) => {
setPageNo(value);
};
const len = isNextNull?.length?.NULL;
const len = isNextNull?.length;

useEffect(() => {
if (isLoading ?? true === true) {