mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-25 06:41:49 +01:00
rename to humanizedEpisodeId
This commit is contained in:
parent
3604a2f0d7
commit
c3985873d4
@ -7,12 +7,12 @@ interface PageTitleControlProps {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function PageTitleControl(props: PageTitleControlProps) {
|
export function PageTitleControl(props: PageTitleControlProps) {
|
||||||
const { isSeries, episodeIdentifier } = useCurrentSeriesEpisodeInfo();
|
const { isSeries, humanizedEpisodeId } = useCurrentSeriesEpisodeInfo();
|
||||||
|
|
||||||
if (!props.media) return null;
|
if (!props.media) return null;
|
||||||
|
|
||||||
const title = isSeries
|
const title = isSeries
|
||||||
? `${props.media.title} - ${episodeIdentifier}`
|
? `${props.media.title} - ${humanizedEpisodeId}`
|
||||||
: props.media.title;
|
: props.media.title;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo";
|
import { useCurrentSeriesEpisodeInfo } from "../hooks/useCurrentSeriesEpisodeInfo";
|
||||||
|
|
||||||
export function ShowTitleControl() {
|
export function ShowTitleControl() {
|
||||||
const { isSeries, currentEpisodeInfo, episodeIdentifier } =
|
const { isSeries, currentEpisodeInfo, humanizedEpisodeId } =
|
||||||
useCurrentSeriesEpisodeInfo();
|
useCurrentSeriesEpisodeInfo();
|
||||||
|
|
||||||
if (!isSeries) return null;
|
if (!isSeries) return null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<p className="ml-8 select-none space-x-2 text-white">
|
<p className="ml-8 select-none space-x-2 text-white">
|
||||||
<span>{episodeIdentifier}</span>
|
<span>{humanizedEpisodeId}</span>
|
||||||
<span className="opacity-50">{currentEpisodeInfo?.title}</span>
|
<span className="opacity-50">{currentEpisodeInfo?.title}</span>
|
||||||
</p>
|
</p>
|
||||||
);
|
);
|
||||||
|
@ -22,11 +22,11 @@ export function useCurrentSeriesEpisodeInfo() {
|
|||||||
|
|
||||||
if (!isSeries) return { isSeries: false };
|
if (!isSeries) return { isSeries: false };
|
||||||
|
|
||||||
const episodeIdentifier = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`;
|
const humanizedEpisodeId = `S${currentSeasonInfo?.number} E${currentEpisodeInfo?.number}`;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
isSeries: true,
|
isSeries: true,
|
||||||
episodeIdentifier,
|
humanizedEpisodeId,
|
||||||
currentSeasonInfo,
|
currentSeasonInfo,
|
||||||
currentEpisodeInfo,
|
currentEpisodeInfo,
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user