Run prettrier

This commit is contained in:
DrMint 2022-05-04 04:13:17 +02:00
parent c49094c843
commit e38f059c69
18 changed files with 391 additions and 392 deletions

View File

@ -15,9 +15,9 @@ import { useEffect, useState } from "react";
import { useSwipeable } from "react-swipeable";
import { ImageQuality } from "./Img";
import OrderableList from "./Inputs/OrderableList";
import Select from "./Inputs/Select";
import MainPanel from "./Panels/MainPanel";
import Popup from "./Popup";
import Select from "./Inputs/Select";
interface Props extends AppStaticProps {
subPanel?: React.ReactNode;

View File

@ -1,8 +1,8 @@
import { AppStaticProps } from "queries/getAppStaticProps";
import { prettyLanguage } from "queries/helpers";
import { Dispatch, SetStateAction } from "react";
import Button from "./Button";
import ToolTip from "../ToolTip";
import Button from "./Button";
interface Props {
className?: string;

View File

@ -1,5 +1,5 @@
import Button from "components/Inputs/Button";
import Chip from "components/Chip";
import Button from "components/Inputs/Button";
import { GetLibraryItemQuery } from "graphql/generated";
import { AppStaticProps } from "queries/getAppStaticProps";
import { prettyinlineTitle, prettySlug } from "queries/helpers";

View File

@ -1,6 +1,6 @@
import Button from "components/Inputs/Button";
import Chip from "components/Chip";
import Img, { getAssetURL, ImageQuality } from "components/Img";
import Button from "components/Inputs/Button";
import LanguageSwitcher from "components/Inputs/LanguageSwitcher";
import RecorderChip from "components/RecorderChip";
import ToolTip from "components/ToolTip";

View File

@ -1,5 +1,5 @@
import Button from "components/Inputs/Button";
import HorizontalLine from "components/HorizontalLine";
import Button from "components/Inputs/Button";
import { useAppLayout } from "contexts/AppLayoutContext";
import { AppStaticProps } from "queries/getAppStaticProps";

View File

@ -1,5 +1,5 @@
import Button from "components/Inputs/Button";
import HorizontalLine from "components/HorizontalLine";
import Button from "components/Inputs/Button";
import NavOption from "components/PanelComponents/NavOption";
import ToolTip from "components/ToolTip";
import { useAppLayout } from "contexts/AppLayoutContext";

View File

@ -174,7 +174,9 @@ export default function ThumbnailPreview(props: Props): JSX.Element {
)}
<div className="my-1">
{pre_title && <p className="leading-none mb-1">{pre_title}</p>}
{title && <p className="font-headers text-lg leading-none">{title}</p>}
{title && (
<p className="font-headers text-lg leading-none">{title}</p>
)}
{subtitle && <p className="leading-none">{subtitle}</p>}
</div>
{description && <p>{description}</p>}

View File

@ -82,4 +82,3 @@ query devGetContents {
}
}
}

View File

@ -1,183 +1,183 @@
query devGetLibraryItems {
libraryItems(pagination: { limit: -1 }) {
data {
id
attributes {
slug
thumbnail {
data {
id
}
}
subitems {
data {
id
}
}
subitem_of {
data {
id
}
}
root_item
price {
amount
currency {
data {
id
}
}
}
metadata {
__typename
}
size {
width
height
thickness
}
release_date {
year
month
day
}
descriptions {
description
language {
data {
id
}
}
}
contents {
data {
id
}
}
digital
categories {
data {
id
}
}
urls {
url
}
images {
language {
data {
id
}
}
source_language {
data {
id
}
}
status
scanners {
data {
id
}
}
cleaners {
data {
id
}
}
typesetters {
data {
id
}
}
cover {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
full {
data {
id
}
}
}
dust_jacket {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
flap_front {
data {
id
}
}
flap_back {
data {
id
}
}
full {
data {
id
}
}
}
obi_belt {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
flap_front {
data {
id
}
}
flap_back {
data {
id
}
}
full {
data {
id
}
}
}
}
}
}
}
libraryItems(pagination: { limit: -1 }) {
data {
id
attributes {
slug
thumbnail {
data {
id
}
}
subitems {
data {
id
}
}
subitem_of {
data {
id
}
}
root_item
price {
amount
currency {
data {
id
}
}
}
metadata {
__typename
}
size {
width
height
thickness
}
release_date {
year
month
day
}
descriptions {
description
language {
data {
id
}
}
}
contents {
data {
id
}
}
digital
categories {
data {
id
}
}
urls {
url
}
images {
language {
data {
id
}
}
source_language {
data {
id
}
}
status
scanners {
data {
id
}
}
cleaners {
data {
id
}
}
typesetters {
data {
id
}
}
cover {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
full {
data {
id
}
}
}
dust_jacket {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
flap_front {
data {
id
}
}
flap_back {
data {
id
}
}
full {
data {
id
}
}
}
obi_belt {
front {
data {
id
}
}
spine {
data {
id
}
}
back {
data {
id
}
}
flap_front {
data {
id
}
}
flap_back {
data {
id
}
}
full {
data {
id
}
}
}
}
}
}
}
}

View File

@ -1,190 +1,190 @@
query getContentText($slug: String, $language_code: String) {
contents(filters: { slug: { eq: $slug } }) {
data {
id
attributes {
slug
titles {
pre_title
title
subtitle
description
}
categories {
data {
id
attributes {
name
short
}
}
}
type {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
}
}
ranged_contents {
data {
id
attributes {
slug
scan_set {
id
}
library_item {
data {
attributes {
slug
title
subtitle
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
}
}
}
text_set {
status
text
language {
data {
attributes {
code
}
}
}
source_language {
data {
attributes {
code
}
}
}
transcribers {
data {
id
attributes {
...recorderChip
}
}
}
translators {
data {
id
attributes {
...recorderChip
}
}
}
proofreaders {
data {
id
attributes {
...recorderChip
}
}
}
notes
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
previous_recommended {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
pre_title
title
subtitle
}
categories {
data {
id
attributes {
short
}
}
}
type {
data {
attributes {
slug
titles(
filters: { language: { code: { eq: $language_code } } }
) {
title
}
}
}
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
next_recommended {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
pre_title
title
subtitle
}
categories {
data {
id
attributes {
short
}
}
}
type {
data {
attributes {
slug
titles(
filters: { language: { code: { eq: $language_code } } }
) {
title
}
}
}
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
}
}
}
}
contents(filters: { slug: { eq: $slug } }) {
data {
id
attributes {
slug
titles {
pre_title
title
subtitle
description
}
categories {
data {
id
attributes {
name
short
}
}
}
type {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
title
}
}
}
}
ranged_contents {
data {
id
attributes {
slug
scan_set {
id
}
library_item {
data {
attributes {
slug
title
subtitle
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
}
}
}
text_set {
status
text
language {
data {
attributes {
code
}
}
}
source_language {
data {
attributes {
code
}
}
}
transcribers {
data {
id
attributes {
...recorderChip
}
}
}
translators {
data {
id
attributes {
...recorderChip
}
}
}
proofreaders {
data {
id
attributes {
...recorderChip
}
}
}
notes
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
previous_recommended {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
pre_title
title
subtitle
}
categories {
data {
id
attributes {
short
}
}
}
type {
data {
attributes {
slug
titles(
filters: { language: { code: { eq: $language_code } } }
) {
title
}
}
}
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
next_recommended {
data {
attributes {
slug
titles(filters: { language: { code: { eq: $language_code } } }) {
pre_title
title
subtitle
}
categories {
data {
id
attributes {
short
}
}
}
type {
data {
attributes {
slug
titles(
filters: { language: { code: { eq: $language_code } } }
) {
title
}
}
}
}
thumbnail {
data {
attributes {
...uploadImage
}
}
}
}
}
}
}
}
}
}

View File

@ -1,4 +1,5 @@
import AppLayout from "components/AppLayout";
import Switch from "components/Inputs/Switch";
import PanelHeader from "components/PanelComponents/PanelHeader";
import ReturnButton, {
ReturnButtonType,
@ -7,7 +8,6 @@ import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { GetVideoChannelQuery } from "graphql/generated";
import { getReadySdk } from "graphql/sdk";

View File

@ -1,5 +1,6 @@
import AppLayout from "components/AppLayout";
import PageSelector from "components/Inputs/PageSelector";
import Switch from "components/Inputs/Switch";
import PanelHeader from "components/PanelComponents/PanelHeader";
import ReturnButton, {
ReturnButtonType,
@ -8,7 +9,6 @@ import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { GetVideosPreviewQuery } from "graphql/generated";
import { getReadySdk } from "graphql/sdk";

View File

@ -1,6 +1,6 @@
import AppLayout from "components/AppLayout";
import Button from "components/Inputs/Button";
import HorizontalLine from "components/HorizontalLine";
import Button from "components/Inputs/Button";
import InsetBox from "components/InsetBox";
import NavOption from "components/PanelComponents/NavOption";
import ReturnButton, {

View File

@ -1,12 +1,12 @@
import AppLayout from "components/AppLayout";
import Chip from "components/Chip";
import Select from "components/Inputs/Select";
import Switch from "components/Inputs/Switch";
import PanelHeader from "components/PanelComponents/PanelHeader";
import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Select from "components/Inputs/Select";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { GetContentsQuery } from "graphql/generated";
import { getReadySdk } from "graphql/sdk";

View File

@ -670,9 +670,9 @@ function testingLibraryItem(libraryItems: Props["libraryItems"]): Report {
) {
const descriptionLanguages: string[] = [];
item.attributes.descriptions?.map((description, descriptionIndex) => {
item.attributes.descriptions.map((description, descriptionIndex) => {
if (description && item.attributes) {
if (description?.description.length < 10) {
if (description.description.length < 10) {
report.lines.push({
subitems: [
item.attributes.slug,
@ -748,8 +748,6 @@ function testingLibraryItem(libraryItems: Props["libraryItems"]): Report {
frontendUrl: frontendUrl,
});
}
}
});

View File

@ -1,7 +1,8 @@
import AppLayout from "components/AppLayout";
import Button from "components/Inputs/Button";
import Chip from "components/Chip";
import Img, { getAssetURL, ImageQuality } from "components/Img";
import Button from "components/Inputs/Button";
import Switch from "components/Inputs/Switch";
import InsetBox from "components/InsetBox";
import ContentLine from "components/Library/ContentLine";
import LightBox from "components/LightBox";
@ -13,7 +14,6 @@ import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { useAppLayout } from "contexts/AppLayoutContext";
import {

View File

@ -1,12 +1,12 @@
import AppLayout from "components/AppLayout";
import Chip from "components/Chip";
import Select from "components/Inputs/Select";
import Switch from "components/Inputs/Switch";
import PanelHeader from "components/PanelComponents/PanelHeader";
import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Select from "components/Inputs/Select";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { GetLibraryItemsPreviewQuery } from "graphql/generated";
import { getReadySdk } from "graphql/sdk";

View File

@ -1,10 +1,10 @@
import AppLayout from "components/AppLayout";
import Switch from "components/Inputs/Switch";
import PanelHeader from "components/PanelComponents/PanelHeader";
import ContentPanel, {
ContentPanelWidthSizes,
} from "components/Panels/ContentPanel";
import SubPanel from "components/Panels/SubPanel";
import Switch from "components/Inputs/Switch";
import ThumbnailPreview from "components/PreviewCard";
import { GetPostsPreviewQuery } from "graphql/generated";
import { getReadySdk } from "graphql/sdk";