diff --git a/package-lock.json b/package-lock.json index d38fcc9..2b30f9a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,6 +28,7 @@ "@types/react-dom": "^17.0.13", "eslint": "8.10.0", "eslint-config-next": "12.1.0", + "prettier-plugin-organize-imports": "^2.3.4", "tailwindcss": "^3.0.23", "typescript": "4.6.2" } @@ -3003,6 +3004,32 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz", + "integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==", + "dev": true, + "peer": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-plugin-organize-imports": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.3.4.tgz", + "integrity": "sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==", + "dev": true, + "peerDependencies": { + "prettier": ">=2.0", + "typescript": ">=2.9" + } + }, "node_modules/prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", @@ -5843,6 +5870,20 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.6.1.tgz", + "integrity": "sha512-8UVbTBYGwN37Bs9LERmxCPjdvPxlEowx2urIL6urHzdb3SDq4B/Z6xLFCblrSnE4iKWcS6ziJ3aOYrc1kz/E2A==", + "dev": true, + "peer": true + }, + "prettier-plugin-organize-imports": { + "version": "2.3.4", + "resolved": "https://registry.npmjs.org/prettier-plugin-organize-imports/-/prettier-plugin-organize-imports-2.3.4.tgz", + "integrity": "sha512-R8o23sf5iVL/U71h9SFUdhdOEPsi3nm42FD/oDYIZ2PQa4TNWWuWecxln6jlIQzpZTDMUeO1NicJP6lLn2TtRw==", + "dev": true, + "requires": {} + }, "prop-types": { "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", diff --git a/package.json b/package.json index 9b9738f..9340471 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,7 @@ "@types/react-dom": "^17.0.13", "eslint": "8.10.0", "eslint-config-next": "12.1.0", + "prettier-plugin-organize-imports": "^2.3.4", "tailwindcss": "^3.0.23", "typescript": "4.6.2" } diff --git a/src/components/AppLayout.tsx b/src/components/AppLayout.tsx index 0d713ee..0e5b560 100644 --- a/src/components/AppLayout.tsx +++ b/src/components/AppLayout.tsx @@ -1,17 +1,17 @@ -import { StrapiImage } from "graphql/operations-types"; -import MainPanel from "./Panels/MainPanel"; -import Head from "next/head"; -import { useSwipeable } from "react-swipeable"; -import { useRouter } from "next/router"; import Button from "components/Button"; -import { getOgImage, OgImage } from "queries/helpers"; -import { useMediaCoarse, useMediaMobile } from "hooks/useMediaQuery"; import { useAppLayout } from "contexts/AppLayoutContext"; -import { ImageQuality } from "./Img"; -import Popup from "./Popup"; -import { useEffect, useState } from "react"; -import Select from "./Select"; +import { StrapiImage } from "graphql/operations-types"; +import { useMediaCoarse, useMediaMobile } from "hooks/useMediaQuery"; +import Head from "next/head"; +import { useRouter } from "next/router"; import { AppStaticProps } from "queries/getAppStaticProps"; +import { getOgImage, OgImage } from "queries/helpers"; +import { useEffect, useState } from "react"; +import { useSwipeable } from "react-swipeable"; +import { ImageQuality } from "./Img"; +import MainPanel from "./Panels/MainPanel"; +import Popup from "./Popup"; +import Select from "./Select"; interface AppLayoutProps extends AppStaticProps { subPanel?: React.ReactNode; diff --git a/src/components/Chip.tsx b/src/components/Chip.tsx index e4c9c98..282f566 100644 --- a/src/components/Chip.tsx +++ b/src/components/Chip.tsx @@ -1,5 +1,3 @@ -import { MouseEventHandler } from "react"; - type ChipProps = { className?: string; children: React.ReactNode; diff --git a/src/components/Content/ThumbnailHeader.tsx b/src/components/Content/ThumbnailHeader.tsx index 4378efd..65de736 100644 --- a/src/components/Content/ThumbnailHeader.tsx +++ b/src/components/Content/ThumbnailHeader.tsx @@ -1,11 +1,11 @@ +import Chip from "components/Chip"; +import Img, { ImageQuality } from "components/Img"; +import InsetBox from "components/InsetBox"; import { GetContentQuery, GetWebsiteInterfaceQuery, } from "graphql/operations-types"; import { prettyinlineTitle, prettySlug, slugify } from "queries/helpers"; -import Img, { ImageQuality } from "components/Img"; -import InsetBox from "components/InsetBox"; -import Chip from "components/Chip"; export type ThumbnailHeaderProps = { pre_title?: string; diff --git a/src/components/Img.tsx b/src/components/Img.tsx index 24861e5..e98790f 100644 --- a/src/components/Img.tsx +++ b/src/components/Img.tsx @@ -1,6 +1,5 @@ import { StrapiImage } from "graphql/operations-types"; -import { ImageProps } from "next/image"; -import Image from "next/image"; +import Image, { ImageProps } from "next/image"; export enum ImageQuality { Small = "small", diff --git a/src/components/Library/LibraryContentPreview.tsx b/src/components/Library/LibraryContentPreview.tsx index 8017528..4cffe0e 100644 --- a/src/components/Library/LibraryContentPreview.tsx +++ b/src/components/Library/LibraryContentPreview.tsx @@ -1,8 +1,8 @@ -import Link from "next/link"; -import { GetContentsQuery } from "graphql/operations-types"; -import { prettySlug } from "queries/helpers"; import Chip from "components/Chip"; import Img, { ImageQuality } from "components/Img"; +import { GetContentsQuery } from "graphql/operations-types"; +import Link from "next/link"; +import { prettySlug } from "queries/helpers"; export type LibraryContentPreviewProps = { item: { diff --git a/src/components/Library/LibraryItemsPreview.tsx b/src/components/Library/LibraryItemsPreview.tsx index ed21e81..f1cac5b 100644 --- a/src/components/Library/LibraryItemsPreview.tsx +++ b/src/components/Library/LibraryItemsPreview.tsx @@ -1,12 +1,12 @@ -import Link from "next/link"; +import Chip from "components/Chip"; +import Img, { ImageQuality } from "components/Img"; +import { useAppLayout } from "contexts/AppLayoutContext"; import { GetCurrenciesQuery, GetLibraryItemsPreviewQuery, } from "graphql/operations-types"; -import { prettyDate, prettyPrice, prettyItemSubType } from "queries/helpers"; -import Chip from "components/Chip"; -import Img, { ImageQuality } from "components/Img"; -import { useAppLayout } from "contexts/AppLayoutContext"; +import Link from "next/link"; +import { prettyDate, prettyItemSubType, prettyPrice } from "queries/helpers"; export type LibraryItemsPreviewProps = { className?: string; diff --git a/src/components/News/PostsPreview.tsx b/src/components/News/PostsPreview.tsx index ee0fdc9..fe1f529 100644 --- a/src/components/News/PostsPreview.tsx +++ b/src/components/News/PostsPreview.tsx @@ -1,8 +1,8 @@ -import Link from "next/link"; -import { prettyDate, prettySlug } from "queries/helpers"; import Chip from "components/Chip"; import Img, { ImageQuality } from "components/Img"; import { GetPostsPreviewQuery } from "graphql/operations-types"; +import Link from "next/link"; +import { prettyDate, prettySlug } from "queries/helpers"; export type PostPreviewProps = { post: { diff --git a/src/components/PanelComponents/NavOption.tsx b/src/components/PanelComponents/NavOption.tsx index 457e0dc..2a4377e 100644 --- a/src/components/PanelComponents/NavOption.tsx +++ b/src/components/PanelComponents/NavOption.tsx @@ -1,7 +1,7 @@ -import { useRouter } from "next/router"; -import Link from "next/link"; -import { MouseEventHandler } from "react"; import ToolTip from "components/ToolTip"; +import Link from "next/link"; +import { useRouter } from "next/router"; +import { MouseEventHandler } from "react"; type NavOptionProps = { url: string; diff --git a/src/components/Panels/MainPanel.tsx b/src/components/Panels/MainPanel.tsx index 11789ce..463b653 100644 --- a/src/components/Panels/MainPanel.tsx +++ b/src/components/Panels/MainPanel.tsx @@ -1,13 +1,13 @@ -import Link from "next/link"; -import NavOption from "components/PanelComponents/NavOption"; -import { useRouter } from "next/router"; import Button from "components/Button"; import HorizontalLine from "components/HorizontalLine"; -import { GetWebsiteInterfaceQuery } from "graphql/operations-types"; -import Markdown from "markdown-to-jsx"; -import { useMediaDesktop } from "hooks/useMediaQuery"; -import { useAppLayout } from "contexts/AppLayoutContext"; +import NavOption from "components/PanelComponents/NavOption"; import ToolTip from "components/ToolTip"; +import { useAppLayout } from "contexts/AppLayoutContext"; +import { GetWebsiteInterfaceQuery } from "graphql/operations-types"; +import { useMediaDesktop } from "hooks/useMediaQuery"; +import Markdown from "markdown-to-jsx"; +import Link from "next/link"; +import { useRouter } from "next/router"; type MainPanelProps = { langui: GetWebsiteInterfaceQuery["websiteInterfaces"]["data"][number]["attributes"]; diff --git a/src/graphql/operations.ts b/src/graphql/operations.ts index e1342cd..d6cf804 100644 --- a/src/graphql/operations.ts +++ b/src/graphql/operations.ts @@ -1,5 +1,4 @@ import { readFileSync } from "fs"; - import { GetChronologyItemsQuery, GetChronologyItemsQueryVariables, diff --git a/src/pages/404.tsx b/src/pages/404.tsx index 8357e42..b138f93 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -1,9 +1,9 @@ -import ContentPanel from "components/Panels/ContentPanel"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; +import ContentPanel from "components/Panels/ContentPanel"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface FourOhFourProps extends AppStaticProps {} diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index 1f34c1a..9a40221 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,13 +1,12 @@ -import type { AppProps } from "next/app"; -import "tailwind.css"; -import "@fontsource/zen-maru-gothic/500.css"; -import "@fontsource/zen-maru-gothic/900.css"; -import "@fontsource/vollkorn/700.css"; +import "@fontsource/material-icons"; import "@fontsource/opendyslexic/400.css"; import "@fontsource/opendyslexic/700.css"; -import "@fontsource/material-icons"; - +import "@fontsource/vollkorn/700.css"; +import "@fontsource/zen-maru-gothic/500.css"; +import "@fontsource/zen-maru-gothic/900.css"; import { AppContextProvider } from "contexts/AppLayoutContext"; +import type { AppProps } from "next/app"; +import "tailwind.css"; export default function AccordsLibraryApp(props: AppProps) { return ( diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 506d91b..f75f632 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -1,9 +1,9 @@ import Document, { - Html, + DocumentContext, Head, + Html, Main, NextScript, - DocumentContext, } from "next/document"; class MyDocument extends Document { diff --git a/src/pages/about-us/contact.tsx b/src/pages/about-us/contact.tsx index 0dfdf31..bb44168 100644 --- a/src/pages/about-us/contact.tsx +++ b/src/pages/about-us/contact.tsx @@ -1,21 +1,21 @@ -import SubPanel from "components/Panels/SubPanel"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import AppLayout from "components/AppLayout"; +import InsetBox from "components/InsetBox"; +import LanguageSwitcher from "components/LanguageSwitcher"; +import Markdawn from "components/Markdown/Markdawn"; +import TOC from "components/Markdown/TOC"; import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import AppLayout from "components/AppLayout"; import ContentPanel from "components/Panels/ContentPanel"; -import { GetStaticProps } from "next"; +import SubPanel from "components/Panels/SubPanel"; import { getPost, getPostLanguages } from "graphql/operations"; import { GetPostQuery } from "graphql/operations-types"; +import { GetStaticProps } from "next"; import { useRouter } from "next/router"; -import LanguageSwitcher from "components/LanguageSwitcher"; -import Markdawn from "components/Markdown/Markdawn"; import { RequestMailProps, ResponseMailProps } from "pages/api/mail"; -import { useState } from "react"; -import InsetBox from "components/InsetBox"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { randomInt } from "queries/helpers"; -import TOC from "components/Markdown/TOC"; +import { useState } from "react"; interface ContactProps extends AppStaticProps { post: GetPostQuery["posts"]["data"][number]["attributes"]; diff --git a/src/pages/about-us/index.tsx b/src/pages/about-us/index.tsx index 089983e..3335daf 100644 --- a/src/pages/about-us/index.tsx +++ b/src/pages/about-us/index.tsx @@ -1,9 +1,9 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import NavOption from "components/PanelComponents/NavOption"; +import PanelHeader from "components/PanelComponents/PanelHeader"; +import SubPanel from "components/Panels/SubPanel"; +import { GetStaticProps } from "next"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface AboutUsProps extends AppStaticProps {} diff --git a/src/pages/archives/index.tsx b/src/pages/archives/index.tsx index 3b3a262..471389a 100644 --- a/src/pages/archives/index.tsx +++ b/src/pages/archives/index.tsx @@ -1,7 +1,7 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; +import PanelHeader from "components/PanelComponents/PanelHeader"; +import SubPanel from "components/Panels/SubPanel"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface ArchivesProps extends AppStaticProps {} diff --git a/src/pages/chronicles/index.tsx b/src/pages/chronicles/index.tsx index 53eaa78..ce19344 100644 --- a/src/pages/chronicles/index.tsx +++ b/src/pages/chronicles/index.tsx @@ -1,7 +1,7 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; +import PanelHeader from "components/PanelComponents/PanelHeader"; +import SubPanel from "components/Panels/SubPanel"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface ChroniclesProps extends AppStaticProps {} diff --git a/src/pages/contents/[slug]/index.tsx b/src/pages/contents/[slug]/index.tsx index f3f7d1f..421f0f1 100644 --- a/src/pages/contents/[slug]/index.tsx +++ b/src/pages/contents/[slug]/index.tsx @@ -1,17 +1,17 @@ -import { GetStaticPaths, GetStaticProps } from "next"; -import { getContent, getContentsSlugs } from "graphql/operations"; -import { GetContentQuery } from "graphql/operations-types"; -import ContentPanel from "components/Panels/ContentPanel"; -import Button from "components/Button"; -import HorizontalLine from "components/HorizontalLine"; -import ThumbnailHeader from "components/Content/ThumbnailHeader"; import AppLayout from "components/AppLayout"; -import SubPanel from "components/Panels/SubPanel"; +import Button from "components/Button"; +import ThumbnailHeader from "components/Content/ThumbnailHeader"; +import HorizontalLine from "components/HorizontalLine"; import ReturnButton, { ReturnButtonType, } from "components/PanelComponents/ReturnButton"; -import { prettyinlineTitle, prettySlug } from "queries/helpers"; +import ContentPanel from "components/Panels/ContentPanel"; +import SubPanel from "components/Panels/SubPanel"; +import { getContent, getContentsSlugs } from "graphql/operations"; +import { GetContentQuery } from "graphql/operations-types"; +import { GetStaticPaths, GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; +import { prettyinlineTitle, prettySlug } from "queries/helpers"; interface ContentIndexProps extends AppStaticProps { content: GetContentQuery["contents"]["data"][number]["attributes"]; diff --git a/src/pages/contents/[slug]/read.tsx b/src/pages/contents/[slug]/read.tsx index 745e4c3..f5902c8 100644 --- a/src/pages/contents/[slug]/read.tsx +++ b/src/pages/contents/[slug]/read.tsx @@ -1,19 +1,27 @@ -import { GetStaticPaths, GetStaticProps } from "next"; +import AppLayout from "components/AppLayout"; +import Button from "components/Button"; +import Chip from "components/Chip"; +import ThumbnailHeader from "components/Content/ThumbnailHeader"; +import HorizontalLine from "components/HorizontalLine"; +import LanguageSwitcher from "components/LanguageSwitcher"; +import Markdawn from "components/Markdown/Markdawn"; +import TOC from "components/Markdown/TOC"; +import ReturnButton, { + ReturnButtonType, +} from "components/PanelComponents/ReturnButton"; +import ContentPanel from "components/Panels/ContentPanel"; +import SubPanel from "components/Panels/SubPanel"; +import RecorderChip from "components/RecorderChip"; +import ToolTip from "components/ToolTip"; import { getContentLanguages, getContentsSlugs, getContentText, } from "graphql/operations"; import { GetContentTextQuery } from "graphql/operations-types"; -import ContentPanel from "components/Panels/ContentPanel"; -import HorizontalLine from "components/HorizontalLine"; -import SubPanel from "components/Panels/SubPanel"; -import ReturnButton, { - ReturnButtonType, -} from "components/PanelComponents/ReturnButton"; -import ThumbnailHeader from "components/Content/ThumbnailHeader"; -import AppLayout from "components/AppLayout"; -import Markdawn from "components/Markdown/Markdawn"; +import { GetStaticPaths, GetStaticProps } from "next"; +import { useRouter } from "next/router"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { getStatusDescription, prettyinlineTitle, @@ -22,14 +30,6 @@ import { prettyTestError, prettyTestWarning, } from "queries/helpers"; -import Button from "components/Button"; -import { useRouter } from "next/router"; -import Chip from "components/Chip"; -import RecorderChip from "components/RecorderChip"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import TOC from "components/Markdown/TOC"; -import ToolTip from "components/ToolTip"; -import LanguageSwitcher from "components/LanguageSwitcher"; interface ContentReadProps extends AppStaticProps { content: GetContentTextQuery["contents"]["data"][number]["attributes"]; diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 77fe5ed..7cdf77a 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -1,21 +1,21 @@ -import { GetStaticProps } from "next"; -import SubPanel from "components/Panels/SubPanel"; +import AppLayout from "components/AppLayout"; +import Chip from "components/Chip"; +import LibraryContentPreview from "components/Library/LibraryContentPreview"; +import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; +import SubPanel from "components/Panels/SubPanel"; +import Select from "components/Select"; +import { getContents } from "graphql/operations"; import { GetContentsQuery, GetWebsiteInterfaceQuery, } from "graphql/operations-types"; -import { getContents } from "graphql/operations"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import AppLayout from "components/AppLayout"; -import LibraryContentPreview from "components/Library/LibraryContentPreview"; -import { prettyinlineTitle, prettySlug } from "queries/helpers"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import Select from "components/Select"; +import { prettyinlineTitle, prettySlug } from "queries/helpers"; import { useEffect, useState } from "react"; -import Chip from "components/Chip"; interface ContentsProps extends AppStaticProps { contents: GetContentsQuery["contents"]["data"]; diff --git a/src/pages/editor.tsx b/src/pages/editor.tsx index 9859fe5..437f1b8 100644 --- a/src/pages/editor.tsx +++ b/src/pages/editor.tsx @@ -1,13 +1,13 @@ +import AppLayout from "components/AppLayout"; +import Markdawn from "components/Markdown/Markdawn"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; import { GetStaticProps } from "next"; -import AppLayout from "components/AppLayout"; -import { useCallback, useState } from "react"; -import Markdawn from "components/Markdown/Markdawn"; +import { useRouter } from "next/router"; import Script from "next/script"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { useRouter } from "next/router"; +import { useCallback, useState } from "react"; interface EditorProps extends AppStaticProps {} diff --git a/src/pages/library/[slug].tsx b/src/pages/library/[slug].tsx index be235bc..6956e4b 100644 --- a/src/pages/library/[slug].tsx +++ b/src/pages/library/[slug].tsx @@ -1,41 +1,41 @@ +import AppLayout from "components/AppLayout"; +import Button from "components/Button"; +import Chip from "components/Chip"; +import Img, { getAssetURL, ImageQuality } from "components/Img"; +import InsetBox from "components/InsetBox"; +import ContentTOCLine from "components/Library/ContentTOCLine"; +import LibraryItemsPreview from "components/Library/LibraryItemsPreview"; +import LightBox from "components/LightBox"; +import NavOption from "components/PanelComponents/NavOption"; +import ReturnButton, { + ReturnButtonType, +} from "components/PanelComponents/ReturnButton"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import { GetStaticPaths, GetStaticProps } from "next"; +import SubPanel from "components/Panels/SubPanel"; +import { useAppLayout } from "contexts/AppLayoutContext"; import { getLibraryItem, getLibraryItemsSlugs } from "graphql/operations"; import { Enum_Componentmetadatabooks_Binding_Type, Enum_Componentmetadatabooks_Page_Order, GetLibraryItemQuery, } from "graphql/operations-types"; +import { GetStaticPaths, GetStaticProps } from "next"; +import { useRouter } from "next/router"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { convertMmToInch, prettyDate, prettyinlineTitle, - prettyItemType, prettyItemSubType, + prettyItemType, prettyPrice, prettyTestError, prettyTestWarning, sortContent, } from "queries/helpers"; -import SubPanel from "components/Panels/SubPanel"; -import ReturnButton, { - ReturnButtonType, -} from "components/PanelComponents/ReturnButton"; -import NavOption from "components/PanelComponents/NavOption"; -import Chip from "components/Chip"; -import Button from "components/Button"; -import AppLayout from "components/AppLayout"; -import LibraryItemsPreview from "components/Library/LibraryItemsPreview"; -import InsetBox from "components/InsetBox"; -import Img, { getAssetURL, ImageQuality } from "components/Img"; -import { useAppLayout } from "contexts/AppLayoutContext"; -import { useRouter } from "next/router"; -import ContentTOCLine from "components/Library/ContentTOCLine"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { useState } from "react"; -import LightBox from "components/LightBox"; interface LibrarySlugProps extends AppStaticProps { item: GetLibraryItemQuery["libraryItems"]["data"][number]["attributes"]; diff --git a/src/pages/library/index.tsx b/src/pages/library/index.tsx index 37e6008..1c5d612 100644 --- a/src/pages/library/index.tsx +++ b/src/pages/library/index.tsx @@ -1,23 +1,23 @@ -import { GetStaticProps } from "next"; -import SubPanel from "components/Panels/SubPanel"; +import AppLayout from "components/AppLayout"; +import Chip from "components/Chip"; +import LibraryItemsPreview from "components/Library/LibraryItemsPreview"; +import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; +import SubPanel from "components/Panels/SubPanel"; +import Select from "components/Select"; +import Switch from "components/Switch"; +import { getLibraryItemsPreview } from "graphql/operations"; import { GetCurrenciesQuery, GetLibraryItemsPreviewQuery, GetWebsiteInterfaceQuery, } from "graphql/operations-types"; -import { getLibraryItemsPreview } from "graphql/operations"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import AppLayout from "components/AppLayout"; -import LibraryItemsPreview from "components/Library/LibraryItemsPreview"; -import Select from "components/Select"; -import { useEffect, useState } from "react"; -import { convertPrice, prettyDate, prettyinlineTitle } from "queries/helpers"; -import Switch from "components/Switch"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import Chip from "components/Chip"; +import { convertPrice, prettyDate, prettyinlineTitle } from "queries/helpers"; +import { useEffect, useState } from "react"; interface LibraryProps extends AppStaticProps { items: GetLibraryItemsPreviewQuery["libraryItems"]["data"]; diff --git a/src/pages/merch/index.tsx b/src/pages/merch/index.tsx index cedd031..2d8546f 100644 --- a/src/pages/merch/index.tsx +++ b/src/pages/merch/index.tsx @@ -1,7 +1,7 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; +import PanelHeader from "components/PanelComponents/PanelHeader"; +import SubPanel from "components/Panels/SubPanel"; +import { GetStaticProps } from "next"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface MerchProps extends AppStaticProps {} diff --git a/src/pages/news/[slug].tsx b/src/pages/news/[slug].tsx index bafb633..c1fdc44 100644 --- a/src/pages/news/[slug].tsx +++ b/src/pages/news/[slug].tsx @@ -17,7 +17,7 @@ import { GetPostQuery, StrapiImage } from "graphql/operations-types"; import { GetStaticPaths, GetStaticProps } from "next"; import { useRouter } from "next/router"; import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { prettySlug, getStatusDescription } from "queries/helpers"; +import { getStatusDescription, prettySlug } from "queries/helpers"; interface PostProps extends AppStaticProps { post: GetPostQuery["posts"]["data"][number]["attributes"]; diff --git a/src/pages/news/index.tsx b/src/pages/news/index.tsx index 82c361a..f8a898d 100644 --- a/src/pages/news/index.tsx +++ b/src/pages/news/index.tsx @@ -1,14 +1,14 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import { GetPostsPreviewQuery } from "graphql/operations-types"; -import { getPostsPreview } from "graphql/operations"; +import PostsPreview from "components/News/PostsPreview"; +import PanelHeader from "components/PanelComponents/PanelHeader"; import ContentPanel, { ContentPanelWidthSizes, } from "components/Panels/ContentPanel"; -import PostsPreview from "components/News/PostsPreview"; +import SubPanel from "components/Panels/SubPanel"; +import { getPostsPreview } from "graphql/operations"; +import { GetPostsPreviewQuery } from "graphql/operations-types"; +import { GetStaticProps } from "next"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface NewsProps extends AppStaticProps { posts: GetPostsPreviewQuery["posts"]["data"]; diff --git a/src/pages/wiki/chronology.tsx b/src/pages/wiki/chronology.tsx index d892db9..6fa8f26 100644 --- a/src/pages/wiki/chronology.tsx +++ b/src/pages/wiki/chronology.tsx @@ -1,25 +1,25 @@ -import { GetStaticProps } from "next"; +import AppLayout from "components/AppLayout"; +import ChronologyYearComponent from "components/Chronology/ChronologyYearComponent"; +import InsetBox from "components/InsetBox"; +import NavOption from "components/PanelComponents/NavOption"; +import ReturnButton, { + ReturnButtonType, +} from "components/PanelComponents/ReturnButton"; import ContentPanel from "components/Panels/ContentPanel"; import SubPanel from "components/Panels/SubPanel"; -import ChronologyYearComponent from "components/Chronology/ChronologyYearComponent"; +import { getChronologyItems, getEras } from "graphql/operations"; import { GetChronologyItemsQuery, GetErasQuery, } from "graphql/operations-types"; -import { getEras, getChronologyItems } from "graphql/operations"; -import NavOption from "components/PanelComponents/NavOption"; -import AppLayout from "components/AppLayout"; +import { GetStaticProps } from "next"; +import { useRouter } from "next/router"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; import { prettySlug, prettyTestError, prettyTestWarning, } from "queries/helpers"; -import InsetBox from "components/InsetBox"; -import { useRouter } from "next/router"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import ReturnButton, { - ReturnButtonType, -} from "components/PanelComponents/ReturnButton"; interface ChronologyProps extends AppStaticProps { chronologyItems: GetChronologyItemsQuery["chronologyItems"]["data"]; diff --git a/src/pages/wiki/index.tsx b/src/pages/wiki/index.tsx index 43a4613..d55d85d 100644 --- a/src/pages/wiki/index.tsx +++ b/src/pages/wiki/index.tsx @@ -1,10 +1,9 @@ -import SubPanel from "components/Panels/SubPanel"; -import PanelHeader from "components/PanelComponents/PanelHeader"; -import { GetStaticProps } from "next"; import AppLayout from "components/AppLayout"; -import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; -import HorizontalLine from "components/HorizontalLine"; import NavOption from "components/PanelComponents/NavOption"; +import PanelHeader from "components/PanelComponents/PanelHeader"; +import SubPanel from "components/Panels/SubPanel"; +import { GetStaticProps } from "next"; +import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps"; interface WikiProps extends AppStaticProps {}