rename to humanizedEpisodeId

This commit is contained in:
destruc7i0n 2023-01-24 08:38:37 -05:00
parent 3604a2f0d7
commit c3985873d4
3 changed files with 6 additions and 6 deletions

View File

@ -7,12 +7,12 @@ interface PageTitleControlProps {
}
export function PageTitleControl(props: PageTitleControlProps) {
const { isSeries, episodeIdentifier } = useCurrentSeriesEpisodeInfo();
const { isSeries, humanizedEpisodeId } = useCurrentSeriesEpisodeInfo();
if (!props.media) return null;
const title = isSeries
? `${props.media.title} - ${episodeIdentifier}`
? `${props.media.title} - ${humanizedEpisodeId}`
: props.media.title;
return (

View File

@ -1,14 +1,14 @@
import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo";
export function ShowTitleControl() {
const { isSeries, currentEpisodeInfo, episodeIdentifier } =
const { isSeries, currentEpisodeInfo, humanizedEpisodeId } =
useCurrentSeriesEpisodeInfo();
if (!isSeries) return null;
return (
<p className="ml-8 select-none space-x-2 text-white">
<span>{episodeIdentifier}</span>
<span>{humanizedEpisodeId}</span>
<span className="opacity-50">{currentEpisodeInfo?.title}</span>
</p>
);

View File

@ -22,11 +22,11 @@ export function useCurrentSeriesEpisodeInfo() {
if (!isSeries) return { isSeries: false };
const episodeIdentifier = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`;
const humanizedEpisodeId = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`;
return {
isSeries: true,
episodeIdentifier,
humanizedEpisodeId,
currentSeasonInfo,
currentEpisodeInfo,
};