fixed the links
This commit is contained in:
parent
3ce7cd487c
commit
2b2a9c41e2
|
@ -20,7 +20,7 @@ export default function LibraryContentPreview(
|
|||
const item = props.item;
|
||||
|
||||
return (
|
||||
<Link href={"/library/content/" + item.slug} passHref>
|
||||
<Link href={"/contents/" + item.slug} passHref>
|
||||
<div className="drop-shadow-dark-xl cursor-pointer grid items-end fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform">
|
||||
{item.thumbnail.data ? (
|
||||
<Img
|
||||
|
|
|
@ -23,7 +23,7 @@ export default function LibraryItemsPreview(
|
|||
const item = props.item;
|
||||
|
||||
return (
|
||||
<Link href={"/library/items/" + item.slug} passHref>
|
||||
<Link href={"/library/" + item.slug} passHref>
|
||||
<div
|
||||
className={`drop-shadow-dark-xl cursor-pointer grid items-end hover:rounded-3xl fine:[--cover-opacity:0] hover:[--cover-opacity:1] hover:scale-[1.02] transition-transform ${props.className}`}
|
||||
>
|
||||
|
|
|
@ -27,7 +27,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
|||
const subPanel = (
|
||||
<SubPanel>
|
||||
<ReturnButton
|
||||
href="/library/content"
|
||||
href="/contents"
|
||||
title={langui.library_content}
|
||||
langui={langui}
|
||||
/>
|
||||
|
@ -42,7 +42,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
|||
<HorizontalLine />
|
||||
|
||||
{content.text_set.length > 0 ? (
|
||||
<Button href={`/library/content/${content.slug}/read/`}>
|
||||
<Button href={`/contents/${content.slug}/read/`}>
|
||||
{langui.content_read_content}
|
||||
</Button>
|
||||
) : (
|
||||
|
@ -50,7 +50,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
|||
)}
|
||||
|
||||
{content.audio_set.length > 0 ? (
|
||||
<Button href={`/library/content/${content.slug}/listen/`}>
|
||||
<Button href={`/contents/${content.slug}/listen/`}>
|
||||
{langui.content_listen_content}
|
||||
</Button>
|
||||
) : (
|
||||
|
@ -58,7 +58,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element {
|
|||
)}
|
||||
|
||||
{content.video_set.length > 0 ? (
|
||||
<Button href={`/library/content/${content.slug}/watch/`}>
|
||||
<Button href={`/contents/${content.slug}/watch/`}>
|
||||
{langui.content_watch_content}
|
||||
</Button>
|
||||
) : (
|
||||
|
|
|
@ -27,7 +27,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
|
|||
const subPanel = (
|
||||
<SubPanel>
|
||||
<ReturnButton
|
||||
href={`/library/content/${content.slug}`}
|
||||
href={`/contents/${content.slug}`}
|
||||
title={"Content"}
|
||||
langui={langui}
|
||||
/>
|
||||
|
|
|
@ -24,23 +24,31 @@ export default function Library(props: LibraryProps): JSX.Element {
|
|||
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
||||
|
||||
props.contents.contents.data.sort((a, b) => {
|
||||
const titleA = a.attributes.titles.length > 0 ? prettyinlineTitle(a.attributes.titles[0].pre_title, a.attributes.titles[0].title, a.attributes.titles[0].subtitle) : a.attributes.slug
|
||||
const titleB = b.attributes.titles.length > 0 ? prettyinlineTitle(b.attributes.titles[0].pre_title, b.attributes.titles[0].title, b.attributes.titles[0].subtitle) : b.attributes.slug
|
||||
const titleA =
|
||||
a.attributes.titles.length > 0
|
||||
? prettyinlineTitle(
|
||||
a.attributes.titles[0].pre_title,
|
||||
a.attributes.titles[0].title,
|
||||
a.attributes.titles[0].subtitle
|
||||
)
|
||||
: a.attributes.slug;
|
||||
const titleB =
|
||||
b.attributes.titles.length > 0
|
||||
? prettyinlineTitle(
|
||||
b.attributes.titles[0].pre_title,
|
||||
b.attributes.titles[0].title,
|
||||
b.attributes.titles[0].subtitle
|
||||
)
|
||||
: b.attributes.slug;
|
||||
return titleA.localeCompare(titleB);
|
||||
});
|
||||
|
||||
const subPanel = (
|
||||
<SubPanel>
|
||||
<ReturnButton
|
||||
href="/library"
|
||||
title={langui.main_library}
|
||||
langui={langui}
|
||||
/>
|
||||
<HorizontalLine />
|
||||
<PanelHeader
|
||||
icon="library_books"
|
||||
title={langui.library_content}
|
||||
description={langui.library_content_description}
|
||||
icon="workspaces"
|
||||
title="Contents"
|
||||
description="Laboriosam vitae velit quis. Non et dolor reiciendis officia earum et molestias excepturi. Cupiditate officiis quis qui reprehenderit. Ut neque eos ipsa corrupti autem mollitia inventore. Exercitationem iste magni vel harum."
|
||||
/>
|
||||
</SubPanel>
|
||||
);
|
||||
|
|
|
@ -53,7 +53,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
|||
const subPanel = (
|
||||
<SubPanel>
|
||||
<ReturnButton
|
||||
href="/library/items"
|
||||
href="/library/"
|
||||
title={langui.library_items}
|
||||
langui={langui}
|
||||
/>
|
||||
|
@ -136,7 +136,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
|||
<div className="grid place-items-center">
|
||||
<p>{langui.global_subitem_of}</p>
|
||||
<Button
|
||||
href={`/library/items/${item.subitem_of.data[0].attributes.slug}`}
|
||||
href={`/library/${item.subitem_of.data[0].attributes.slug}`}
|
||||
>
|
||||
{prettyinlineTitle(
|
||||
"",
|
||||
|
@ -432,7 +432,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
|||
|
||||
{content.attributes.scan_set.length > 0 ? (
|
||||
<Button
|
||||
href={`/library/content/${content.attributes.content.data.attributes.slug}/scans/`}
|
||||
href={`/contents/${content.attributes.content.data.attributes.slug}/scans/`}
|
||||
>
|
||||
{langui.library_item_view_scans}
|
||||
</Button>
|
||||
|
@ -442,7 +442,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {
|
|||
|
||||
{content.attributes.content.data ? (
|
||||
<Button
|
||||
href={`/library/content/${content.attributes.content.data.attributes.slug}`}
|
||||
href={`/contents/${content.attributes.content.data.attributes.slug}`}
|
||||
>
|
||||
{langui.library_item_open_content}
|
||||
</Button>
|
||||
|
|
|
@ -13,8 +13,6 @@ import {
|
|||
} from "graphql/operations";
|
||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
||||
import AppLayout from "components/AppLayout";
|
||||
import ReturnButton from "components/PanelComponents/ReturnButton";
|
||||
import HorizontalLine from "components/HorizontalLine";
|
||||
import LibraryItemsPreview from "components/Library/LibraryItemsPreview";
|
||||
|
||||
type LibraryProps = {
|
||||
|
@ -26,16 +24,10 @@ export default function Library(props: LibraryProps): JSX.Element {
|
|||
const langui = props.langui.websiteInterfaces.data[0].attributes;
|
||||
const subPanel = (
|
||||
<SubPanel>
|
||||
<ReturnButton
|
||||
href="/library"
|
||||
title={langui.main_library}
|
||||
langui={langui}
|
||||
/>
|
||||
<HorizontalLine />
|
||||
<PanelHeader
|
||||
icon="library_books"
|
||||
title={langui.library_items}
|
||||
description={langui.library_items_description}
|
||||
title={langui.main_library}
|
||||
description={langui.library_description}
|
||||
/>
|
||||
</SubPanel>
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue