- {
- e.currentTarget.style.opacity = 1;
- }}
- style={{
- y: parallax,
+ e.currentTarget.style.opacity = "1";
}}
/>
@@ -300,34 +291,35 @@ function PersonTitlePage() {
aspectRatio: item.data.PrimaryImageAspectRatio ?? 1,
}}
>
- {Object.keys(item.data.ImageTags).includes("Primary") ? (
- <>
+ {item.data.ImageTags?.Primary && (
+
.getItemImageUrlById()
{
- e.currentTarget.style.opacity = 1;
+ e.currentTarget.style.opacity = "1";
}}
className="item-hero-image"
/>
- >
- ) : (
- <>>
+
)}
@@ -339,7 +331,7 @@ function PersonTitlePage() {
itemName={item.data.Name}
itemId={item.data.Id}
queryKey={["item", id]}
- isFavorite={item.data.UserData.IsFavorite}
+ isFavorite={item.data.UserData?.IsFavorite}
userId={user?.Id}
/>
@@ -358,9 +350,11 @@ function PersonTitlePage() {
marginTop: "1em",
}}
>
- {item.data.ExternalUrls.map((url) => (
-
{item.data.PremiereDate && (
- <>
+
Birth
{new Date(item.data.PremiereDate).toDateString()}
- >
+
)}
{item.data.EndDate && (
- <>
+
Death
{new Date(item.data.EndDate).toDateString()}
- >
+
)}
@@ -394,7 +388,7 @@ function PersonTitlePage() {