mirror of
https://github.com/movie-web/movie-web.git
synced 2024-11-11 00:05:09 +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) {
|
||||
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 (
|
||||
|
@ -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>
|
||||
);
|
||||
|
@ -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,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user