mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add head details for collections
This commit is contained in:
parent
9084a78420
commit
d73a37fbed
@ -21,9 +21,11 @@
|
||||
export const Head = ({
|
||||
title,
|
||||
description,
|
||||
image,
|
||||
}: {
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
image?: string | null;
|
||||
}) => {
|
||||
return null;
|
||||
};
|
||||
|
@ -23,14 +23,17 @@ import NextHead from "next/head";
|
||||
export const Head = ({
|
||||
title,
|
||||
description,
|
||||
image,
|
||||
}: {
|
||||
title?: string | null;
|
||||
description?: string | null;
|
||||
image?: string | null;
|
||||
}) => {
|
||||
return (
|
||||
<NextHead>
|
||||
{title && <title>{title + " - Kyoo"}</title>}
|
||||
{description && <meta name="description" content={description} />}
|
||||
{image && <meta property="og:image" content={image} />}
|
||||
</NextHead>
|
||||
);
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ import {
|
||||
getDisplayDate,
|
||||
} from "@kyoo/models";
|
||||
import { Header as ShowHeader, TitleLine } from "../details/header";
|
||||
import { Container, ImageBackground, P, Skeleton, ts } from "@kyoo/primitives";
|
||||
import { Container, Head, ImageBackground, P, Skeleton, ts } from "@kyoo/primitives";
|
||||
import { percent, px, useYoshiki } from "yoshiki/native";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { forwardRef } from "react";
|
||||
@ -48,6 +48,8 @@ const Header = ({ slug }: { slug: string }) => {
|
||||
<Fetch query={Header.query(slug)}>
|
||||
{({ isLoading, ...data }) => (
|
||||
<>
|
||||
<Head title={data?.name} description={data?.overview} image={data?.thumbnail?.high} />
|
||||
|
||||
<ImageBackground
|
||||
src={data?.thumbnail}
|
||||
quality="high"
|
||||
|
@ -386,7 +386,7 @@ export const Header = ({
|
||||
<Fetch query={query}>
|
||||
{({ isLoading, ...data }) => (
|
||||
<>
|
||||
<Head title={data?.name} description={data?.overview} />
|
||||
<Head title={data?.name} description={data?.overview} image={data?.thumbnail?.high} />
|
||||
<ImageBackground
|
||||
src={data?.thumbnail}
|
||||
quality="high"
|
||||
|
Loading…
x
Reference in New Issue
Block a user