Renamed prettyinline

This commit is contained in:
DrMint 2022-07-19 20:06:31 +02:00
parent ceaacc8242
commit 74b77431a9
8 changed files with 23 additions and 23 deletions

View File

@ -1,7 +1,7 @@
import { GetChroniclesChaptersQuery } from "graphql/generated";
import { filterHasAttributes } from "helpers/others";
import { TranslatedChroniclePreview } from "components/Translated";
import { prettyinlineTitle, prettySlug } from "helpers/formatters";
import { prettyInlineTitle, prettySlug } from "helpers/formatters";
import { Ico, Icon } from "components/Ico";
import { useBoolean } from "hooks/useBoolean";
import { compareDate } from "helpers/date";
@ -76,7 +76,7 @@ export const ChroniclesList = ({
content.attributes.translations,
["language.data.attributes.code"] as const
).map((translation) => ({
title: prettyinlineTitle(
title: prettyInlineTitle(
translation.pre_title,
translation.title,
translation.subtitle

View File

@ -4,7 +4,7 @@ import { InsetBox } from "components/InsetBox";
import { Markdawn } from "components/Markdown/Markdawn";
import { GetContentTextQuery, UploadImageFragment } from "graphql/generated";
import { AppStaticProps } from "graphql/getAppStaticProps";
import { prettyinlineTitle, prettySlug, slugify } from "helpers/formatters";
import { prettyInlineTitle, prettySlug, slugify } from "helpers/formatters";
import { getAssetURL, ImageQuality } from "helpers/img";
import { filterHasAttributes } from "helpers/others";
import { useLightBox } from "hooks/useLightBox";
@ -65,7 +65,7 @@ export const ThumbnailHeader = ({
</div>
<div
id={slugify(
prettyinlineTitle(pre_title ?? "", title, subtitle ?? "")
prettyInlineTitle(pre_title ?? "", title, subtitle ?? "")
)}
className="grid place-items-center text-center"
>

View File

@ -45,7 +45,7 @@ export const prettySlug = (slug?: string, parentSlug?: string): string => {
return "";
};
export const prettyinlineTitle = (
export const prettyInlineTitle = (
pretitle: string | null | undefined,
title: string | null | undefined,
subtitle: string | null | undefined

View File

@ -19,7 +19,7 @@ import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { getDescription } from "helpers/description";
import {
prettyinlineTitle,
prettyInlineTitle,
prettyLanguage,
prettyItemSubType,
prettySlug,
@ -288,7 +288,7 @@ const Content = ({
<HorizontalLine />
<TableOfContents
text={selectedTranslation.text_set.text}
title={prettyinlineTitle(
title={prettyInlineTitle(
selectedTranslation.pre_title,
selectedTranslation.title,
selectedTranslation.subtitle
@ -459,7 +459,7 @@ const Content = ({
<AppLayout
navTitle={
selectedTranslation
? prettyinlineTitle(
? prettyInlineTitle(
selectedTranslation.pre_title,
selectedTranslation.title,
selectedTranslation.subtitle

View File

@ -11,7 +11,7 @@ import {
import { SubPanel } from "components/Panels/SubPanel";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import { prettyinlineTitle, prettySlug } from "helpers/formatters";
import { prettyInlineTitle, prettySlug } from "helpers/formatters";
import { TextInput } from "components/Inputs/TextInput";
import { WithLabel } from "components/Inputs/WithLabel";
import { Button } from "components/Inputs/Button";
@ -124,7 +124,7 @@ const Contents = ({
if (searchName.length > 1) {
if (
filterDefined(item.attributes.translations).find((translation) =>
prettyinlineTitle(
prettyInlineTitle(
translation.pre_title,
translation.title,
translation.subtitle
@ -291,7 +291,7 @@ const Contents = ({
${item.attributes.slug}
${filterDefined(item.attributes.translations)
.map((translation) =>
prettyinlineTitle(
prettyInlineTitle(
translation.pre_title,
translation.title,
translation.subtitle

View File

@ -28,7 +28,7 @@ import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
prettyDate,
prettyinlineTitle,
prettyInlineTitle,
prettyItemSubType,
prettyItemType,
prettyPrice,
@ -185,7 +185,7 @@ const LibrarySlug = ({
<p>{langui.subitem_of}</p>
<Button
href={`/library/${item.subitem_of.data[0].attributes.slug}`}
text={prettyinlineTitle(
text={prettyInlineTitle(
"",
item.subitem_of.data[0].attributes.title,
item.subitem_of.data[0].attributes.subtitle
@ -585,7 +585,7 @@ const LibrarySlug = ({
return (
<AppLayout
navTitle={prettyinlineTitle("", item.title, item.subtitle)}
navTitle={prettyInlineTitle("", item.title, item.subtitle)}
contentPanel={contentPanel}
subPanel={subPanel}
thumbnail={item.thumbnail?.data?.attributes ?? undefined}
@ -708,7 +708,7 @@ const ContentLine = ({
<a>
<h3 className="cursor-pointer" onClick={toggleOpened}>
{selectedTranslation
? prettyinlineTitle(
? prettyInlineTitle(
selectedTranslation.pre_title,
selectedTranslation.title,
selectedTranslation.subtitle

View File

@ -15,7 +15,7 @@ import { GetLibraryItemScansQuery } from "graphql/generated";
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
prettyinlineTitle,
prettyInlineTitle,
prettySlug,
prettyItemSubType,
} from "helpers/formatters";
@ -120,7 +120,7 @@ const LibrarySlug = ({
["language.data.attributes"] as const
).map((translation) => ({
language: translation.language.data.attributes.code,
title: prettyinlineTitle(
title: prettyInlineTitle(
translation.pre_title,
translation.title,
translation.subtitle
@ -201,7 +201,7 @@ const LibrarySlug = ({
["language.data.attributes"] as const
).map((translation) => ({
language: translation.language.data.attributes.code,
title: prettyinlineTitle(
title: prettyInlineTitle(
translation.pre_title,
translation.title,
translation.subtitle
@ -232,7 +232,7 @@ const LibrarySlug = ({
return (
<AppLayout
navTitle={prettyinlineTitle("", item.title, item.subtitle)}
navTitle={prettyInlineTitle("", item.title, item.subtitle)}
contentPanel={contentPanel}
subPanel={subPanel}
thumbnail={item.thumbnail?.data?.attributes ?? undefined}

View File

@ -14,7 +14,7 @@ import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
import { getReadySdk } from "graphql/sdk";
import {
prettyDate,
prettyinlineTitle,
prettyInlineTitle,
prettyItemSubType,
} from "helpers/formatters";
import { LibraryItemUserStatus } from "helpers/types";
@ -152,12 +152,12 @@ const Library = ({
) => {
switch (sortingMethod) {
case 0: {
const titleA = prettyinlineTitle(
const titleA = prettyInlineTitle(
"",
a.attributes.title,
a.attributes.subtitle
);
const titleB = prettyinlineTitle(
const titleB = prettyInlineTitle(
"",
b.attributes.title,
b.attributes.subtitle
@ -449,7 +449,7 @@ const Library = ({
sortingFunction={sortingFunction}
groupingFunction={groupingFunction}
searchingBy={(item) =>
prettyinlineTitle(
prettyInlineTitle(
"",
item.attributes.title,
item.attributes.subtitle