From 2b2a9c41e23af8eb2b69f4205b963ed2c89bfd41 Mon Sep 17 00:00:00 2001 From: DrMint Date: Mon, 21 Feb 2022 19:59:42 +0100 Subject: [PATCH] fixed the links --- .../Library/LibraryContentPreview.tsx | 2 +- .../Library/LibraryItemsPreview.tsx | 2 +- src/pages/contents/[slug]/index.tsx | 8 ++--- src/pages/contents/[slug]/read.tsx | 2 +- src/pages/contents/index.tsx | 30 ++++++++++++------- src/pages/library/[slug].tsx | 8 ++--- src/pages/library/index.tsx | 12 ++------ 7 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/components/Library/LibraryContentPreview.tsx b/src/components/Library/LibraryContentPreview.tsx index 21ae3f6..72a85d7 100644 --- a/src/components/Library/LibraryContentPreview.tsx +++ b/src/components/Library/LibraryContentPreview.tsx @@ -20,7 +20,7 @@ export default function LibraryContentPreview( const item = props.item; return ( - +
{item.thumbnail.data ? ( +
diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index cd78005..774df55 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -27,7 +27,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element { const subPanel = ( @@ -42,7 +42,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element { {content.text_set.length > 0 ? ( - ) : ( @@ -50,7 +50,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element { )} {content.audio_set.length > 0 ? ( - ) : ( @@ -58,7 +58,7 @@ export default function ContentIndex(props: ContentIndexProps): JSX.Element { )} {content.video_set.length > 0 ? ( - ) : ( diff --git a/src/pages/contents/[slug]/read.tsx b/src/pages/contents/[slug]/read.tsx index fc51f70..18c8c21 100644 --- a/src/pages/contents/[slug]/read.tsx +++ b/src/pages/contents/[slug]/read.tsx @@ -27,7 +27,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element { const subPanel = ( diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 2a08592..4c061e9 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -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 = ( - - ); diff --git a/src/pages/library/[slug].tsx b/src/pages/library/[slug].tsx index b6e10d8..3e78478 100644 --- a/src/pages/library/[slug].tsx +++ b/src/pages/library/[slug].tsx @@ -53,7 +53,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { const subPanel = ( @@ -136,7 +136,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element {

{langui.global_subitem_of}

@@ -442,7 +442,7 @@ export default function LibrarySlug(props: LibrarySlugProps): JSX.Element { {content.attributes.content.data ? ( diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index d37a4b1..c69ce9d 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -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 = ( - - );