Fix card navigating Persona and artists #176
This commit is contained in:
8 files changed
+25
-8
No files matched your search
@@ -77,8 +77,10 @@ export const Card = ({
|
|||||||
const defaultOnClick = () => {
|
const defaultOnClick = () => {
|
||||||
if (availableSpecialRoutes.includes(item.Type)) {
|
if (availableSpecialRoutes.includes(item.Type)) {
|
||||||
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
||||||
} else if (!!item.Role) {
|
} else if (!!item.Role || item.Type == BaseItemKind.Person) {
|
||||||
navigate(`/person/${item.Id}`);
|
navigate(`/person/${item.Id}`);
|
||||||
|
} else if (item.Type == BaseItemKind.MusicArtist) {
|
||||||
|
navigate(`/artist/${item.Id}`);
|
||||||
} else {
|
} else {
|
||||||
navigate(`/item/${item.Id}`);
|
navigate(`/item/${item.Id}`);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ const MusicAlbumTitlePage = () => {
|
|||||||
|
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
<CardScroller
|
<CardScroller
|
||||||
title="You may also like"
|
title="You might also like"
|
||||||
displayCards={8}
|
displayCards={8}
|
||||||
disableDecoration
|
disableDecoration
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -247,7 +247,7 @@ const BoxSetTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
<CardScroller
|
<CardScroller
|
||||||
title="More Like This"
|
title="You might also like"
|
||||||
displayCards={8}
|
displayCards={8}
|
||||||
disableDecoration
|
disableDecoration
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -635,7 +635,7 @@ const ItemDetail = () => {
|
|||||||
)}
|
)}
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
<CardScroller
|
<CardScroller
|
||||||
title="More Like This"
|
title="You might also like"
|
||||||
displayCards={8}
|
displayCards={8}
|
||||||
disableDecoration
|
disableDecoration
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -446,8 +446,6 @@ const LibraryView = () => {
|
|||||||
setFilterButtonAnchorEl(null);
|
setFilterButtonAnchorEl(null);
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log(sortBy == "Random");
|
|
||||||
|
|
||||||
const handleLiking = async (item) => {
|
const handleLiking = async (item) => {
|
||||||
let result;
|
let result;
|
||||||
if (item.UserData.isFavorite) {
|
if (item.UserData.isFavorite) {
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import CircularProgress from "@mui/material/CircularProgress";
|
|||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
import Tabs from "@mui/material/Tabs";
|
import Tabs from "@mui/material/Tabs";
|
||||||
import Tab from "@mui/material/Tab";
|
import Tab from "@mui/material/Tab";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { AnimatePresence, motion } from "framer-motion";
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
@@ -165,6 +166,7 @@ const PersonTitlePage = () => {
|
|||||||
fields: ["SeasonUserData", "Overview"],
|
fields: ["SeasonUserData", "Overview"],
|
||||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
excludeLocationTypes: [LocationType.Virtual],
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
limit: 24,
|
||||||
});
|
});
|
||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
@@ -424,6 +426,19 @@ const PersonTitlePage = () => {
|
|||||||
},
|
},
|
||||||
)}
|
)}
|
||||||
</motion.div>
|
</motion.div>
|
||||||
|
{tab.data.isSuccess &&
|
||||||
|
tab.data.data
|
||||||
|
.TotalRecordCount >
|
||||||
|
24 && (
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
style={{
|
||||||
|
opacity: 0.8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
And more...
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
</TabPanel>
|
</TabPanel>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -192,7 +192,7 @@ const PlaylistTitlePage = () => {
|
|||||||
|
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
<CardScroller
|
<CardScroller
|
||||||
title="You may also like"
|
title="You might also like"
|
||||||
displayCards={8}
|
displayCards={8}
|
||||||
disableDecoration
|
disableDecoration
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -409,6 +409,8 @@ const SeriesTitlePage = () => {
|
|||||||
episode.ParentIndexNumber ==
|
episode.ParentIndexNumber ==
|
||||||
0
|
0
|
||||||
? `${episode.SeasonName} - ${episode.Name}`
|
? `${episode.SeasonName} - ${episode.Name}`
|
||||||
|
: !!episode.IndexNumberEnd
|
||||||
|
? `${episode.IndexNumber}-${episode.IndexNumberEnd}. ${episode.Name}`
|
||||||
: `${episode.IndexNumber}. ${episode.Name}`
|
: `${episode.IndexNumber}. ${episode.Name}`
|
||||||
}
|
}
|
||||||
cardCaption={
|
cardCaption={
|
||||||
@@ -527,7 +529,7 @@ const SeriesTitlePage = () => {
|
|||||||
)}
|
)}
|
||||||
{similarItems.data.TotalRecordCount > 0 && (
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
<CardScroller
|
<CardScroller
|
||||||
title="More Like This"
|
title="You might also like"
|
||||||
displayCards={8}
|
displayCards={8}
|
||||||
disableDecoration
|
disableDecoration
|
||||||
>
|
>
|
||||||
|
|||||||
Reference in new issue
Block a user