mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 04:04:21 -04:00
Cleanup the etails page
This commit is contained in:
parent
eeb111dd9e
commit
4993ae50fe
@ -36,7 +36,7 @@ export const EpisodeList = <Props,>({
|
|||||||
slug: string;
|
slug: string;
|
||||||
season: string | number;
|
season: string | number;
|
||||||
Header: ComponentType<Props & { children: JSX.Element }>;
|
Header: ComponentType<Props & { children: JSX.Element }>;
|
||||||
headerProps: Props
|
headerProps: Props;
|
||||||
}) => {
|
}) => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
@ -42,7 +42,10 @@ const SvgWave = (props: SvgProps) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const ShowHeader = forwardRef<View, ViewProps & { slug: string }>(function _ShowHeader({ children, slug, ...props }, ref) {
|
const ShowHeader = forwardRef<View, ViewProps & { slug: string }>(function _ShowHeader(
|
||||||
|
{ children, slug, ...props },
|
||||||
|
ref,
|
||||||
|
) {
|
||||||
const { css, theme } = useYoshiki();
|
const { css, theme } = useYoshiki();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -78,7 +81,7 @@ const ShowHeader = forwardRef<View, ViewProps & { slug: string }>(function _Show
|
|||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const query = (slug: string): QueryIdentifier<Show> => ({
|
const query = (slug: string): QueryIdentifier<Show> => ({
|
||||||
parser: ShowP,
|
parser: ShowP,
|
||||||
@ -89,14 +92,11 @@ const query = (slug: string): QueryIdentifier<Show> => ({
|
|||||||
});
|
});
|
||||||
|
|
||||||
export const ShowDetails: QueryPage<{ slug: string; season: string }> = ({ slug, season }) => {
|
export const ShowDetails: QueryPage<{ slug: string; season: string }> = ({ slug, season }) => {
|
||||||
|
const { css, theme } = useYoshiki();
|
||||||
return (
|
return (
|
||||||
<SwitchVariant>
|
<View {...css({ bg: theme.variant.background, flex: 1 })}>
|
||||||
{({ css, theme }) => (
|
<EpisodeList slug={slug} season={season} Header={ShowHeader} headerProps={{ slug }} />
|
||||||
<View {...css({ bg: theme.background, flex: 1 })}>
|
</View>
|
||||||
<EpisodeList slug={slug} season={season} Header={ShowHeader} headerProps={{slug}} />
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</SwitchVariant>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user