Removed the default in the exports whenever possible
This commit is contained in:
parent
be7c508aaa
commit
5c7689c3f0
@ -1,4 +1,4 @@
|
|||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { UploadImageFragment } from "graphql/generated";
|
import { UploadImageFragment } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
@ -10,10 +10,10 @@ import Head from "next/head";
|
|||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import { useSwipeable } from "react-swipeable";
|
import { useSwipeable } from "react-swipeable";
|
||||||
import OrderableList from "./Inputs/OrderableList";
|
import { OrderableList } from "./Inputs/OrderableList";
|
||||||
import Select from "./Inputs/Select";
|
import { Select } from "./Inputs/Select";
|
||||||
import MainPanel from "./Panels/MainPanel";
|
import { MainPanel } from "./Panels/MainPanel";
|
||||||
import Popup from "./Popup";
|
import { Popup } from "./Popup";
|
||||||
|
|
||||||
interface Props extends AppStaticProps {
|
interface Props extends AppStaticProps {
|
||||||
subPanel?: React.ReactNode;
|
subPanel?: React.ReactNode;
|
||||||
@ -25,7 +25,7 @@ interface Props extends AppStaticProps {
|
|||||||
description?: string;
|
description?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function AppLayout(props: Immutable<Props>): JSX.Element {
|
export function AppLayout(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
langui,
|
langui,
|
||||||
currencies,
|
currencies,
|
||||||
|
@ -5,7 +5,7 @@ interface Props {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Chip(props: Immutable<Props>): JSX.Element {
|
export function Chip(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`grid place-content-center place-items-center text-xs pb-[0.14rem]
|
className={`grid place-content-center place-items-center text-xs pb-[0.14rem]
|
||||||
|
@ -4,7 +4,7 @@ interface Props {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function HorizontalLine(props: Immutable<Props>): JSX.Element {
|
export function HorizontalLine(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`h-0 w-full my-8 border-t-[3px] border-dotted border-black ${props.className}`}
|
className={`h-0 w-full my-8 border-t-[3px] border-dotted border-black ${props.className}`}
|
||||||
|
@ -12,7 +12,7 @@ interface Props {
|
|||||||
onClick?: MouseEventHandler<HTMLImageElement>;
|
onClick?: MouseEventHandler<HTMLImageElement>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Img(props: Immutable<Props>): JSX.Element {
|
export function Img(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
className,
|
className,
|
||||||
image,
|
image,
|
||||||
|
@ -15,7 +15,7 @@ interface Props {
|
|||||||
badgeNumber?: number;
|
badgeNumber?: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Button(props: Immutable<Props>): JSX.Element {
|
export function Button(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
draggable,
|
draggable,
|
||||||
id,
|
id,
|
||||||
|
@ -2,8 +2,8 @@ import { AppStaticProps } from "graphql/getAppStaticProps";
|
|||||||
import { prettyLanguage } from "helpers/formatters";
|
import { prettyLanguage } from "helpers/formatters";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
import ToolTip from "../ToolTip";
|
import { ToolTip } from "../ToolTip";
|
||||||
import Button from "./Button";
|
import { Button } from "./Button";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -13,7 +13,7 @@ interface Props {
|
|||||||
setLocalesIndex: Dispatch<SetStateAction<number | undefined>>;
|
setLocalesIndex: Dispatch<SetStateAction<number | undefined>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LanguageSwitcher(props: Immutable<Props>): JSX.Element {
|
export function LanguageSwitcher(props: Immutable<Props>): JSX.Element {
|
||||||
const { locales, className, localesIndex, setLocalesIndex } = props;
|
const { locales, className, localesIndex, setLocalesIndex } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -8,7 +8,7 @@ interface Props {
|
|||||||
onChange?: (items: Map<string, string>) => void;
|
onChange?: (items: Map<string, string>) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function OrderableList(props: Immutable<Props>): JSX.Element {
|
export function OrderableList(props: Immutable<Props>): JSX.Element {
|
||||||
const [items, setItems] = useState<Map<string, string>>(props.items);
|
const [items, setItems] = useState<Map<string, string>>(props.items);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
import Button from "./Button";
|
import { Button } from "./Button";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -9,7 +9,7 @@ interface Props {
|
|||||||
setPage: Dispatch<SetStateAction<number>>;
|
setPage: Dispatch<SetStateAction<number>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PageSelector(props: Immutable<Props>): JSX.Element {
|
export function PageSelector(props: Immutable<Props>): JSX.Element {
|
||||||
const { page, setPage, maxPage } = props;
|
const { page, setPage, maxPage } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -10,7 +10,7 @@ interface Props {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Select(props: Immutable<Props>): JSX.Element {
|
export function Select(props: Immutable<Props>): JSX.Element {
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -7,7 +7,7 @@ interface Props {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Switch(props: Immutable<Props>): JSX.Element {
|
export function Switch(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`h-6 w-12 rounded-full border-2 border-mid grid
|
className={`h-6 w-12 rounded-full border-2 border-mid grid
|
||||||
|
@ -6,7 +6,7 @@ interface Props {
|
|||||||
id?: string;
|
id?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function InsetBox(props: Immutable<Props>): JSX.Element {
|
export function InsetBox(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
id={props.id}
|
id={props.id}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import { GetLibraryItemQuery } from "graphql/generated";
|
import { GetLibraryItemQuery } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { prettyinlineTitle, prettySlug } from "helpers/formatters";
|
import { prettyinlineTitle, prettySlug } from "helpers/formatters";
|
||||||
@ -21,7 +21,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ContentLine(props: Immutable<Props>): JSX.Element {
|
export function ContentLine(props: Immutable<Props>): JSX.Element {
|
||||||
const { content, langui, parentSlug } = props;
|
const { content, langui, parentSlug } = props;
|
||||||
|
|
||||||
const [opened, setOpened] = useState(false);
|
const [opened, setOpened] = useState(false);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Img from "components/Img";
|
import { Img } from "components/Img";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import RecorderChip from "components/RecorderChip";
|
import { RecorderChip } from "components/RecorderChip";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import { GetLibraryItemScansQuery } from "graphql/generated";
|
import { GetLibraryItemScansQuery } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img";
|
import { getAssetFilename, getAssetURL, ImageQuality } from "helpers/img";
|
||||||
@ -48,7 +48,7 @@ interface Props {
|
|||||||
>["content"];
|
>["content"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ScanSet(props: Immutable<Props>): JSX.Element {
|
export function ScanSet(props: Immutable<Props>): JSX.Element {
|
||||||
const { openLightBox, scanSet, slug, title, languages, langui, content } =
|
const { openLightBox, scanSet, slug, title, languages, langui, content } =
|
||||||
props;
|
props;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Img from "components/Img";
|
import { Img } from "components/Img";
|
||||||
import RecorderChip from "components/RecorderChip";
|
import { RecorderChip } from "components/RecorderChip";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import {
|
import {
|
||||||
GetLibraryItemScansQuery,
|
GetLibraryItemScansQuery,
|
||||||
UploadImageFragment,
|
UploadImageFragment,
|
||||||
@ -28,7 +28,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ScanSetCover(props: Immutable<Props>): JSX.Element {
|
export function ScanSetCover(props: Immutable<Props>): JSX.Element {
|
||||||
const { openLightBox, images, languages, langui } = props;
|
const { openLightBox, images, languages, langui } = props;
|
||||||
|
|
||||||
const [selectedScan, LanguageSwitcher] = useSmartLanguage({
|
const [selectedScan, LanguageSwitcher] = useSmartLanguage({
|
||||||
|
@ -2,9 +2,9 @@ import { Immutable } from "helpers/types";
|
|||||||
import { Dispatch, SetStateAction } from "react";
|
import { Dispatch, SetStateAction } from "react";
|
||||||
import Hotkeys from "react-hot-keys";
|
import Hotkeys from "react-hot-keys";
|
||||||
import { useSwipeable } from "react-swipeable";
|
import { useSwipeable } from "react-swipeable";
|
||||||
import Img from "./Img";
|
import { Img } from "./Img";
|
||||||
import Button from "./Inputs/Button";
|
import { Button } from "./Inputs/Button";
|
||||||
import Popup from "./Popup";
|
import { Popup } from "./Popup";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
setState:
|
setState:
|
||||||
@ -16,7 +16,7 @@ interface Props {
|
|||||||
setIndex: Dispatch<SetStateAction<number>>;
|
setIndex: Dispatch<SetStateAction<number>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function LightBox(props: Immutable<Props>): JSX.Element {
|
export function LightBox(props: Immutable<Props>): JSX.Element {
|
||||||
const { state, setState, images, index, setIndex } = props;
|
const { state, setState, images, index, setIndex } = props;
|
||||||
|
|
||||||
function handlePrevious() {
|
function handlePrevious() {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import Img from "components/Img";
|
import { Img } from "components/Img";
|
||||||
import InsetBox from "components/InsetBox";
|
import { InsetBox } from "components/InsetBox";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { slugify } from "helpers/formatters";
|
import { slugify } from "helpers/formatters";
|
||||||
import { getAssetURL, ImageQuality } from "helpers/img";
|
import { getAssetURL, ImageQuality } from "helpers/img";
|
||||||
@ -17,7 +17,7 @@ interface Props {
|
|||||||
text: string;
|
text: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Markdawn(props: Immutable<Props>): JSX.Element {
|
export function Markdawn(props: Immutable<Props>): JSX.Element {
|
||||||
const appLayout = useAppLayout();
|
const appLayout = useAppLayout();
|
||||||
const text = preprocessMarkDawn(props.text);
|
const text = preprocessMarkDawn(props.text);
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ interface Props {
|
|||||||
title?: string;
|
title?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function TOCComponent(props: Immutable<Props>): JSX.Element {
|
export function TOC(props: Immutable<Props>): JSX.Element {
|
||||||
const { text, title } = props;
|
const { text, title } = props;
|
||||||
const toc = getTocFromMarkdawn(preprocessMarkDawn(text), title);
|
const toc = getTocFromMarkdawn(preprocessMarkDawn(text), title);
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
@ -29,7 +29,7 @@ export default function TOCComponent(props: Immutable<Props>): JSX.Element {
|
|||||||
}
|
}
|
||||||
|
|
||||||
interface LevelProps {
|
interface LevelProps {
|
||||||
tocchildren: TOC[];
|
tocchildren: TOCInterface[];
|
||||||
parentNumbering: string;
|
parentNumbering: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -61,14 +61,14 @@ function TOCLevel(props: LevelProps): JSX.Element {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
interface TOC {
|
interface TOCInterface {
|
||||||
title: string;
|
title: string;
|
||||||
slug: string;
|
slug: string;
|
||||||
children: TOC[];
|
children: TOCInterface[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getTocFromMarkdawn(text: string, title?: string): TOC {
|
export function getTocFromMarkdawn(text: string, title?: string): TOCInterface {
|
||||||
const toc: TOC = {
|
const toc: TOCInterface = {
|
||||||
title: title ?? "Return to top",
|
title: title ?? "Return to top",
|
||||||
slug: slugify(title),
|
slug: slugify(title),
|
||||||
children: [],
|
children: [],
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
import { MouseEventHandler } from "react";
|
import { MouseEventHandler } from "react";
|
||||||
@ -13,7 +13,7 @@ interface Props {
|
|||||||
onClick?: MouseEventHandler<HTMLDivElement>;
|
onClick?: MouseEventHandler<HTMLDivElement>;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function NavOption(props: Immutable<Props>): JSX.Element {
|
export function NavOption(props: Immutable<Props>): JSX.Element {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const isActive = router.asPath.startsWith(props.url);
|
const isActive = router.asPath.startsWith(props.url);
|
||||||
const divActive = "bg-mid shadow-inner-sm shadow-shade";
|
const divActive = "bg-mid shadow-inner-sm shadow-shade";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
@ -7,7 +7,7 @@ interface Props {
|
|||||||
description?: string | null | undefined;
|
description?: string | null | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PanelHeader(props: Immutable<Props>): JSX.Element {
|
export function PanelHeader(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="w-full grid place-items-center">
|
<div className="w-full grid place-items-center">
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
@ -19,7 +19,7 @@ export enum ReturnButtonType {
|
|||||||
both = "both",
|
both = "both",
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ReturnButton(props: Immutable<Props>): JSX.Element {
|
export function ReturnButton(props: Immutable<Props>): JSX.Element {
|
||||||
const appLayout = useAppLayout();
|
const appLayout = useAppLayout();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -11,7 +11,7 @@ export enum ContentPanelWidthSizes {
|
|||||||
large = "large",
|
large = "large",
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ContentPanel(props: Immutable<Props>): JSX.Element {
|
export function ContentPanel(props: Immutable<Props>): JSX.Element {
|
||||||
const width = props.width ? props.width : ContentPanelWidthSizes.default;
|
const width = props.width ? props.width : ContentPanelWidthSizes.default;
|
||||||
const widthCSS =
|
const widthCSS =
|
||||||
width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full";
|
width === ContentPanelWidthSizes.default ? "max-w-2xl" : "w-full";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import Button from "components/Inputs/Button";
|
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";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
@ -13,7 +13,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function MainPanel(props: Immutable<Props>): JSX.Element {
|
export function MainPanel(props: Immutable<Props>): JSX.Element {
|
||||||
const { langui } = props;
|
const { langui } = props;
|
||||||
const isDesktop = useMediaDesktop();
|
const isDesktop = useMediaDesktop();
|
||||||
const appLayout = useAppLayout();
|
const appLayout = useAppLayout();
|
||||||
|
@ -4,7 +4,7 @@ interface Props {
|
|||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SubPanel(props: Immutable<Props>): JSX.Element {
|
export function SubPanel(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className="grid pt-10 pb-20 px-6 desktop:py-8 desktop:px-10 gap-y-2 text-center">
|
<div className="grid pt-10 pb-20 px-6 desktop:py-8 desktop:px-10 gap-y-2 text-center">
|
||||||
{props.children}
|
{props.children}
|
||||||
|
@ -14,7 +14,7 @@ interface Props {
|
|||||||
padding?: boolean;
|
padding?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function Popup(props: Immutable<Props>): JSX.Element {
|
export function Popup(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
setState,
|
setState,
|
||||||
state,
|
state,
|
||||||
|
@ -3,17 +3,17 @@ import { prettySlug } from "helpers/formatters";
|
|||||||
import { getStatusDescription } from "helpers/others";
|
import { getStatusDescription } from "helpers/others";
|
||||||
import { Immutable, PostWithTranslations } from "helpers/types";
|
import { Immutable, PostWithTranslations } from "helpers/types";
|
||||||
import { useSmartLanguage } from "hooks/useSmartLanguage";
|
import { useSmartLanguage } from "hooks/useSmartLanguage";
|
||||||
import AppLayout from "./AppLayout";
|
import { AppLayout } from "./AppLayout";
|
||||||
import Chip from "./Chip";
|
import { Chip } from "./Chip";
|
||||||
import HorizontalLine from "./HorizontalLine";
|
import { HorizontalLine } from "./HorizontalLine";
|
||||||
import Markdawn from "./Markdown/Markdawn";
|
import { Markdawn } from "./Markdown/Markdawn";
|
||||||
import TOC from "./Markdown/TOC";
|
import { TOC } from "./Markdown/TOC";
|
||||||
import ReturnButton, { ReturnButtonType } from "./PanelComponents/ReturnButton";
|
import { ReturnButton, ReturnButtonType } from "./PanelComponents/ReturnButton";
|
||||||
import ContentPanel from "./Panels/ContentPanel";
|
import { ContentPanel } from "./Panels/ContentPanel";
|
||||||
import SubPanel from "./Panels/SubPanel";
|
import { SubPanel } from "./Panels/SubPanel";
|
||||||
import RecorderChip from "./RecorderChip";
|
import { RecorderChip } from "./RecorderChip";
|
||||||
import ThumbnailHeader from "./ThumbnailHeader";
|
import { ThumbnailHeader } from "./ThumbnailHeader";
|
||||||
import ToolTip from "./ToolTip";
|
import { ToolTip } from "./ToolTip";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
post: PostWithTranslations;
|
post: PostWithTranslations;
|
||||||
@ -31,7 +31,7 @@ interface Props {
|
|||||||
appendBody?: JSX.Element;
|
appendBody?: JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PostPage(props: Immutable<Props>): JSX.Element {
|
export function PostPage(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
post,
|
post,
|
||||||
langui,
|
langui,
|
||||||
|
@ -14,8 +14,8 @@ import {
|
|||||||
import { ImageQuality } from "helpers/img";
|
import { ImageQuality } from "helpers/img";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import Chip from "./Chip";
|
import { Chip } from "./Chip";
|
||||||
import Img from "./Img";
|
import { Img } from "./Img";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
thumbnail?: UploadImageFragment | string | null | undefined;
|
thumbnail?: UploadImageFragment | string | null | undefined;
|
||||||
@ -45,7 +45,7 @@ interface Props {
|
|||||||
| { __typename: "anotherHoverlayName" };
|
| { __typename: "anotherHoverlayName" };
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PreviewCard(props: Immutable<Props>): JSX.Element {
|
export function PreviewCard(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
href,
|
href,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
|
@ -2,8 +2,8 @@ import { UploadImageFragment } from "graphql/generated";
|
|||||||
import { ImageQuality } from "helpers/img";
|
import { ImageQuality } from "helpers/img";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import Chip from "./Chip";
|
import { Chip } from "./Chip";
|
||||||
import Img from "./Img";
|
import { Img } from "./Img";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
thumbnail?: UploadImageFragment | string | null | undefined;
|
thumbnail?: UploadImageFragment | string | null | undefined;
|
||||||
@ -16,7 +16,7 @@ interface Props {
|
|||||||
bottomChips?: string[];
|
bottomChips?: string[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function PreviewLine(props: Immutable<Props>): JSX.Element {
|
export function PreviewLine(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
href,
|
href,
|
||||||
thumbnail,
|
thumbnail,
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import { RecorderChipFragment } from "graphql/generated";
|
import { RecorderChipFragment } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { ImageQuality } from "helpers/img";
|
import { ImageQuality } from "helpers/img";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import Img from "./Img";
|
import { Img } from "./Img";
|
||||||
import Markdawn from "./Markdown/Markdawn";
|
import { Markdawn } from "./Markdown/Markdawn";
|
||||||
import ToolTip from "./ToolTip";
|
import { ToolTip } from "./ToolTip";
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
className?: string;
|
className?: string;
|
||||||
@ -13,7 +13,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function RecorderChip(props: Immutable<Props>): JSX.Element {
|
export function RecorderChip(props: Immutable<Props>): JSX.Element {
|
||||||
const { recorder, langui } = props;
|
const { recorder, langui } = props;
|
||||||
return (
|
return (
|
||||||
<ToolTip
|
<ToolTip
|
||||||
|
@ -7,7 +7,7 @@ interface Props {
|
|||||||
className?: string;
|
className?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function SVG(props: Immutable<Props>): JSX.Element {
|
export function SVG(props: Immutable<Props>): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div className={props.className}>
|
<div className={props.className}>
|
||||||
<Image
|
<Image
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Img from "components/Img";
|
import { Img } from "components/Img";
|
||||||
import InsetBox from "components/InsetBox";
|
import { InsetBox } from "components/InsetBox";
|
||||||
import Markdawn from "components/Markdown/Markdawn";
|
import { Markdawn } from "components/Markdown/Markdawn";
|
||||||
import { GetContentQuery, UploadImageFragment } from "graphql/generated";
|
import { GetContentQuery, UploadImageFragment } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { prettyinlineTitle, prettySlug, slugify } from "helpers/formatters";
|
import { prettyinlineTitle, prettySlug, slugify } from "helpers/formatters";
|
||||||
@ -33,7 +33,7 @@ interface Props {
|
|||||||
languageSwitcher?: JSX.Element;
|
languageSwitcher?: JSX.Element;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ThumbnailHeader(props: Immutable<Props>): JSX.Element {
|
export function ThumbnailHeader(props: Immutable<Props>): JSX.Element {
|
||||||
const {
|
const {
|
||||||
langui,
|
langui,
|
||||||
pre_title,
|
pre_title,
|
||||||
|
@ -3,7 +3,7 @@ import "tippy.js/animations/scale-subtle.css";
|
|||||||
|
|
||||||
interface Props extends TippyProps {}
|
interface Props extends TippyProps {}
|
||||||
|
|
||||||
export default function ToolTip(props: Props): JSX.Element {
|
export function ToolTip(props: Props): JSX.Element {
|
||||||
const newProps: Props = {
|
const newProps: Props = {
|
||||||
delay: [150, 0],
|
delay: [150, 0],
|
||||||
interactive: true,
|
interactive: true,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import {
|
import {
|
||||||
Enum_Componenttranslationschronologyitem_Status,
|
Enum_Componenttranslationschronologyitem_Status,
|
||||||
GetChronologyItemsQuery,
|
GetChronologyItemsQuery,
|
||||||
@ -17,9 +17,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ChronologyItemComponent(
|
export function ChronologyItemComponent(props: Immutable<Props>): JSX.Element {
|
||||||
props: Immutable<Props>
|
|
||||||
): JSX.Element {
|
|
||||||
const { langui } = props;
|
const { langui } = props;
|
||||||
|
|
||||||
function generateAnchor(
|
function generateAnchor(
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import ChronologyItemComponent from "components/Wiki/Chronology/ChronologyItemComponent";
|
import { ChronologyItemComponent } from "components/Wiki/Chronology/ChronologyItemComponent";
|
||||||
import { GetChronologyItemsQuery } from "graphql/generated";
|
import { GetChronologyItemsQuery } from "graphql/generated";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
@ -12,9 +12,7 @@ interface Props {
|
|||||||
langui: AppStaticProps["langui"];
|
langui: AppStaticProps["langui"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function ChronologyYearComponent(
|
export function ChronologyYearComponent(props: Immutable<Props>): JSX.Element {
|
||||||
props: Immutable<Props>
|
|
||||||
): JSX.Element {
|
|
||||||
const { langui } = props;
|
const { langui } = props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import useDarkMode from "hooks/useDarkMode";
|
import { useDarkMode } from "hooks/useDarkMode";
|
||||||
import useStateWithLocalStorage from "hooks/useStateWithLocalStorage";
|
import { useStateWithLocalStorage } from "hooks/useStateWithLocalStorage";
|
||||||
import React, { ReactNode, useContext, useState } from "react";
|
import React, { ReactNode, useContext, useState } from "react";
|
||||||
|
|
||||||
interface AppLayoutState {
|
interface AppLayoutState {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
import { useEffect } from "react";
|
import { useEffect } from "react";
|
||||||
import { usePrefersDarkMode } from "./useMediaQuery";
|
import { usePrefersDarkMode } from "./useMediaQuery";
|
||||||
import useStateWithLocalStorage from "./useStateWithLocalStorage";
|
import { useStateWithLocalStorage } from "./useStateWithLocalStorage";
|
||||||
|
|
||||||
export default function useDarkMode(
|
export function useDarkMode(
|
||||||
key: string,
|
key: string,
|
||||||
initialValue: boolean | undefined
|
initialValue: boolean | undefined
|
||||||
): [
|
): [
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import LightBox from "components/LightBox";
|
import { LightBox } from "components/LightBox";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
export function useLightBox(): [
|
export function useLightBox(): [
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function useMediaQuery(query: string): boolean {
|
export function useMediaQuery(query: string): boolean {
|
||||||
function getMatches(query: string): boolean {
|
function getMatches(query: string): boolean {
|
||||||
// Prevents SSR issues
|
// Prevents SSR issues
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import LanguageSwitcher from "components/Inputs/LanguageSwitcher";
|
import { LanguageSwitcher } from "components/Inputs/LanguageSwitcher";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
export default function useStateWithLocalStorage<T>(
|
export function useStateWithLocalStorage<T>(
|
||||||
key: string,
|
key: string,
|
||||||
initialValue: T
|
initialValue: T
|
||||||
): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>] {
|
): [T | undefined, React.Dispatch<React.SetStateAction<T | undefined>>] {
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
import ContentPanel from "components/Panels/ContentPanel";
|
import { ContentPanel } from "components/Panels/ContentPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,8 +1,9 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
import ContentPanel from "components/Panels/ContentPanel";
|
import { ContentPanel } from "components/Panels/ContentPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -6,7 +6,7 @@ import Document, {
|
|||||||
NextScript,
|
NextScript,
|
||||||
} from "next/document";
|
} from "next/document";
|
||||||
|
|
||||||
class MyDocument extends Document {
|
export default class MyDocument extends Document {
|
||||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||||
static async getInitialProps(ctx: DocumentContext) {
|
static async getInitialProps(ctx: DocumentContext) {
|
||||||
const initialProps = await Document.getInitialProps(ctx);
|
const initialProps = await Document.getInitialProps(ctx);
|
||||||
@ -65,5 +65,3 @@ class MyDocument extends Document {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default MyDocument;
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
PostStaticProps,
|
PostStaticProps,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import InsetBox from "components/InsetBox";
|
import { InsetBox } from "components/InsetBox";
|
||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
PostStaticProps,
|
PostStaticProps,
|
||||||
@ -10,9 +10,7 @@ import { useRouter } from "next/router";
|
|||||||
import { RequestMailProps, ResponseMailProps } from "pages/api/mail";
|
import { RequestMailProps, ResponseMailProps } from "pages/api/mail";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
|
|
||||||
export default function AboutUs(
|
export default function AboutUs(props: Immutable<PostStaticProps>): JSX.Element {
|
||||||
props: Immutable<PostStaticProps>
|
|
||||||
): JSX.Element {
|
|
||||||
const { post, langui, languages, currencies } = props;
|
const { post, langui, languages, currencies } = props;
|
||||||
|
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import NavOption from "components/PanelComponents/NavOption";
|
import { NavOption } from "components/PanelComponents/NavOption";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
PostStaticProps,
|
PostStaticProps,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
PostStaticProps,
|
PostStaticProps,
|
||||||
|
@ -14,7 +14,7 @@ export interface RequestMailProps {
|
|||||||
formName: string;
|
formName: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function Mail(
|
export async function Mail(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
res: NextApiResponse<ResponseMailProps>
|
res: NextApiResponse<ResponseMailProps>
|
||||||
) {
|
) {
|
||||||
|
@ -70,7 +70,7 @@ type ResponseMailProps = {
|
|||||||
revalidated: boolean;
|
revalidated: boolean;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default async function Mail(
|
export async function Mail(
|
||||||
req: NextApiRequest,
|
req: NextApiRequest,
|
||||||
res: NextApiResponse<ResponseMailProps>
|
res: NextApiResponse<ResponseMailProps>
|
||||||
) {
|
) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import NavOption from "components/PanelComponents/NavOption";
|
import { NavOption } from "components/PanelComponents/NavOption";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Switch from "components/Inputs/Switch";
|
import { Switch } from "components/Inputs/Switch";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
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 PreviewCard from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { GetVideoChannelQuery } from "graphql/generated";
|
import { GetVideoChannelQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
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 { Switch } from "components/Inputs/Switch";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
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 PreviewCard from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { GetVideosPreviewQuery } from "graphql/generated";
|
import { GetVideosPreviewQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import Button from "components/Inputs/Button";
|
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,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
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 { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { GetVideoQuery } from "graphql/generated";
|
import { GetVideoQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import HorizontalLine from "components/HorizontalLine";
|
import { HorizontalLine } from "components/HorizontalLine";
|
||||||
import Markdawn from "components/Markdown/Markdawn";
|
import { Markdawn } from "components/Markdown/Markdawn";
|
||||||
import TOC from "components/Markdown/TOC";
|
import { TOC } from "components/Markdown/TOC";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
import ContentPanel from "components/Panels/ContentPanel";
|
import { ContentPanel } from "components/Panels/ContentPanel";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import PreviewLine from "components/PreviewLine";
|
import { PreviewLine } from "components/PreviewLine";
|
||||||
import RecorderChip from "components/RecorderChip";
|
import { RecorderChip } from "components/RecorderChip";
|
||||||
import ThumbnailHeader from "components/ThumbnailHeader";
|
import { ThumbnailHeader } from "components/ThumbnailHeader";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import { GetContentTextQuery } from "graphql/generated";
|
import { GetContentTextQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
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 { Select } from "components/Inputs/Select";
|
||||||
import Switch from "components/Inputs/Switch";
|
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 PreviewCard from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { GetContentsQuery } from "graphql/generated";
|
import { GetContentsQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
@ -120,7 +121,8 @@ export default function Contents(props: Immutable<Props>): JSX.Element {
|
|||||||
thumbnailAspectRatio="3/2"
|
thumbnailAspectRatio="3/2"
|
||||||
stackEffect={
|
stackEffect={
|
||||||
item.attributes.next_recommended?.data?.id !== null &&
|
item.attributes.next_recommended?.data?.id !== null &&
|
||||||
item.attributes.next_recommended?.data?.id !== undefined &&
|
item.attributes.next_recommended?.data?.id !==
|
||||||
|
undefined &&
|
||||||
combineRelatedContent
|
combineRelatedContent
|
||||||
}
|
}
|
||||||
topChips={
|
topChips={
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import ContentPanel, {
|
import {
|
||||||
|
ContentPanel,
|
||||||
ContentPanelWidthSizes,
|
ContentPanelWidthSizes,
|
||||||
} from "components/Panels/ContentPanel";
|
} from "components/Panels/ContentPanel";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import {
|
import {
|
||||||
DevGetContentsQuery,
|
DevGetContentsQuery,
|
||||||
Enum_Componentsetstextset_Status,
|
Enum_Componentsetstextset_Status,
|
||||||
@ -39,7 +40,8 @@ export default function CheckupContents(props: Immutable<Props>): JSX.Element {
|
|||||||
{testReport.lines.map((line, index) => (
|
{testReport.lines.map((line, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className="grid grid-cols-[2em,3em,2fr,1fr,0.5fr,0.5fr,2fr] gap-2 items-center mb-2 justify-items-start"
|
className="grid grid-cols-[2em,3em,2fr,1fr,0.5fr,0.5fr,2fr]
|
||||||
|
gap-2 items-center mb-2 justify-items-start"
|
||||||
>
|
>
|
||||||
<Button
|
<Button
|
||||||
href={line.frontendUrl}
|
href={line.frontendUrl}
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import ContentPanel, {
|
import {
|
||||||
|
ContentPanel,
|
||||||
ContentPanelWidthSizes,
|
ContentPanelWidthSizes,
|
||||||
} from "components/Panels/ContentPanel";
|
} from "components/Panels/ContentPanel";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import {
|
import {
|
||||||
DevGetLibraryItemsQuery,
|
DevGetLibraryItemsQuery,
|
||||||
Enum_Componentcollectionscomponentlibraryimages_Status,
|
Enum_Componentcollectionscomponentlibraryimages_Status,
|
||||||
@ -18,9 +19,7 @@ interface Props extends AppStaticProps {
|
|||||||
libraryItems: DevGetLibraryItemsQuery;
|
libraryItems: DevGetLibraryItemsQuery;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CheckupLibraryItems(
|
export default function CheckupLibraryItems(props: Immutable<Props>): JSX.Element {
|
||||||
props: Immutable<Props>
|
|
||||||
): JSX.Element {
|
|
||||||
const { libraryItems } = props;
|
const { libraryItems } = props;
|
||||||
const testReport = testingLibraryItem(libraryItems);
|
const testReport = testingLibraryItem(libraryItems);
|
||||||
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import Markdawn from "components/Markdown/Markdawn";
|
import { Markdawn } from "components/Markdown/Markdawn";
|
||||||
import ContentPanel, {
|
import {
|
||||||
|
ContentPanel,
|
||||||
ContentPanelWidthSizes,
|
ContentPanelWidthSizes,
|
||||||
} from "components/Panels/ContentPanel";
|
} from "components/Panels/ContentPanel";
|
||||||
import Popup from "components/Popup";
|
import { Popup } from "components/Popup";
|
||||||
import ToolTip from "components/ToolTip";
|
import { ToolTip } from "components/ToolTip";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
PostStaticProps,
|
PostStaticProps,
|
||||||
|
@ -1,19 +1,21 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Chip from "components/Chip";
|
import { Chip } from "components/Chip";
|
||||||
import Img from "components/Img";
|
import { Img } from "components/Img";
|
||||||
import Button from "components/Inputs/Button";
|
import { Button } from "components/Inputs/Button";
|
||||||
import Switch from "components/Inputs/Switch";
|
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 NavOption from "components/PanelComponents/NavOption";
|
import { NavOption } from "components/PanelComponents/NavOption";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
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 PreviewCard from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import {
|
import {
|
||||||
Enum_Componentmetadatabooks_Binding_Type,
|
Enum_Componentmetadatabooks_Binding_Type,
|
||||||
|
@ -1,14 +1,16 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import ScanSet from "components/Library/ScanSet";
|
import { ScanSet } from "components/Library/ScanSet";
|
||||||
import ScanSetCover from "components/Library/ScanSetCover";
|
import { ScanSetCover } from "components/Library/ScanSetCover";
|
||||||
import NavOption from "components/PanelComponents/NavOption";
|
import { NavOption } from "components/PanelComponents/NavOption";
|
||||||
import ReturnButton, {
|
import {
|
||||||
|
ReturnButton,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
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 { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { GetLibraryItemScansQuery } from "graphql/generated";
|
import { GetLibraryItemScansQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
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 { Select } from "components/Inputs/Select";
|
||||||
import Switch from "components/Inputs/Switch";
|
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 ThumbnailPreview from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { GetLibraryItemsPreviewQuery } from "graphql/generated";
|
import { GetLibraryItemsPreviewQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
@ -163,7 +164,7 @@ export default function Library(props: Immutable<Props>): JSX.Element {
|
|||||||
{items.map((item) => (
|
{items.map((item) => (
|
||||||
<>
|
<>
|
||||||
{item.attributes && (
|
{item.attributes && (
|
||||||
<ThumbnailPreview
|
<PreviewCard
|
||||||
key={item.id}
|
key={item.id}
|
||||||
href={`/library/${item.attributes.slug}`}
|
href={`/library/${item.attributes.slug}`}
|
||||||
title={item.attributes.title}
|
title={item.attributes.title}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import PostPage from "components/PostPage";
|
import { PostPage } from "components/PostPage";
|
||||||
import { AppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import {
|
import {
|
||||||
getPostStaticProps,
|
getPostStaticProps,
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import Switch from "components/Inputs/Switch";
|
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 PreviewCard from "components/PreviewCard";
|
import { PreviewCard } from "components/PreviewCard";
|
||||||
import { GetPostsPreviewQuery } from "graphql/generated";
|
import { GetPostsPreviewQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { getReadySdk } from "graphql/sdk";
|
import { getReadySdk } from "graphql/sdk";
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
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,
|
||||||
ReturnButtonType,
|
ReturnButtonType,
|
||||||
} from "components/PanelComponents/ReturnButton";
|
} from "components/PanelComponents/ReturnButton";
|
||||||
import ContentPanel from "components/Panels/ContentPanel";
|
import { ContentPanel } from "components/Panels/ContentPanel";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import ChronologyYearComponent from "components/Wiki/Chronology/ChronologyYearComponent";
|
import { ChronologyYearComponent } from "components/Wiki/Chronology/ChronologyYearComponent";
|
||||||
import { useAppLayout } from "contexts/AppLayoutContext";
|
import { useAppLayout } from "contexts/AppLayoutContext";
|
||||||
import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated";
|
import { GetChronologyItemsQuery, GetErasQuery } from "graphql/generated";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import AppLayout from "components/AppLayout";
|
import { AppLayout } from "components/AppLayout";
|
||||||
import NavOption from "components/PanelComponents/NavOption";
|
import { NavOption } from "components/PanelComponents/NavOption";
|
||||||
import PanelHeader from "components/PanelComponents/PanelHeader";
|
import { PanelHeader } from "components/PanelComponents/PanelHeader";
|
||||||
import SubPanel from "components/Panels/SubPanel";
|
import { SubPanel } from "components/Panels/SubPanel";
|
||||||
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "graphql/getAppStaticProps";
|
||||||
import { Immutable } from "helpers/types";
|
import { Immutable } from "helpers/types";
|
||||||
import { GetStaticPropsContext } from "next";
|
import { GetStaticPropsContext } from "next";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user