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 { useSwipeable } from "react-swipeable";
import { ImageQuality } from "./Img"; import { ImageQuality } from "./Img";
import OrderableList from "./Inputs/OrderableList"; import OrderableList from "./Inputs/OrderableList";
import Select from "./Inputs/Select";
import MainPanel from "./Panels/MainPanel"; import MainPanel from "./Panels/MainPanel";
import Popup from "./Popup"; import Popup from "./Popup";
import Select from "./Inputs/Select";
interface Props extends AppStaticProps { interface Props extends AppStaticProps {
subPanel?: React.ReactNode; subPanel?: React.ReactNode;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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