Add criticsRating and improve icons and animations in itemPage
This commit is contained in:
12 files changed
+194
-74
No files matched your search
@@ -9,6 +9,8 @@ import Paper from "@mui/material/Paper";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -34,6 +36,7 @@ import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import LikeButton from "../../components/buttons/likeButton";
|
||||
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -179,7 +182,18 @@ const MusicAlbumTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -418,7 +432,7 @@ const MusicAlbumTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -32,6 +32,7 @@ import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import MusicTrack from "../../components/musicTrack";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -197,7 +198,18 @@ const ArtistTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -401,7 +413,7 @@ const ArtistTitlePage = () => {
|
||||
</TabPanel>
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -6,6 +6,8 @@ import Box from "@mui/material/Box";
|
||||
import CircularProgress from "@mui/material/CircularProgress";
|
||||
import { useParams, useNavigate } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -149,7 +151,18 @@ const BoxSetTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -312,7 +325,7 @@ const BoxSetTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -27,6 +29,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { ActorCard } from "../../components/card/actorCards";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -175,7 +178,18 @@ const EpisodeTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY episode"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -270,7 +284,7 @@ const EpisodeTitlePage = () => {
|
||||
)}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -7,6 +7,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
||||
|
||||
import { useParams } from "react-router-dom";
|
||||
|
||||
import { motion, AnimatePresence } from "framer-motion";
|
||||
|
||||
import {
|
||||
BaseItemKind,
|
||||
ItemFields,
|
||||
@@ -29,6 +31,7 @@ import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||
import { ActorCard } from "../../components/card/actorCards";
|
||||
import { useApi } from "../../utils/store/api";
|
||||
|
||||
function TabPanel(props) {
|
||||
const { children, value, index, ...other } = props;
|
||||
|
||||
@@ -200,9 +203,21 @@ const ItemDetail = () => {
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -320,7 +335,7 @@ const ItemDetail = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
@@ -267,7 +267,18 @@ const PersonTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -446,7 +457,7 @@ const PersonTitlePage = () => {
|
||||
})}
|
||||
</AnimatePresence>
|
||||
</div>
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError) {
|
||||
|
||||
@@ -228,7 +228,18 @@ const SeriesTitlePage = () => {
|
||||
}
|
||||
if (item.isSuccess && similarItems.isSuccess) {
|
||||
return (
|
||||
<div
|
||||
<motion.div
|
||||
key={id}
|
||||
initial={{
|
||||
opacity: 0,
|
||||
}}
|
||||
animate={{
|
||||
opacity: 1,
|
||||
}}
|
||||
transition={{
|
||||
duration: 0.25,
|
||||
ease: "easeInOut",
|
||||
}}
|
||||
className="scrollY"
|
||||
style={{
|
||||
padding: "5em 2em 2em 1em",
|
||||
@@ -633,7 +644,7 @@ const SeriesTitlePage = () => {
|
||||
})}
|
||||
</CardScroller>
|
||||
)}
|
||||
</div>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
if (item.isError || similarItems.isError) {
|
||||
|
||||
Reference in new issue
Block a user