Fixed errors that prevented building

This commit is contained in:
DrMint 2022-03-12 14:03:26 +01:00
parent b213447c49
commit 28ac9012ff
5 changed files with 24 additions and 23 deletions

View File

@ -6,7 +6,7 @@ export type SwitchProps = {
className?: string;
};
export default function Select(props: SwitchProps): JSX.Element {
export default function Switch(props: SwitchProps): JSX.Element {
return (
<div
className={`h-6 w-12 rounded-full border-2 border-mid grid transition-colors relative cursor-pointer ${

View File

@ -143,19 +143,23 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
</div>
)}
<HorizontalLine />
<TOC
text={content.text_set[0].text}
title={
content.titles.length > 0
? prettyinlineTitle(
content.titles[0].pre_title,
content.titles[0].title,
content.titles[0].subtitle
)
: prettySlug(content.slug)
}
/>
{content.text_set.length > 0 && content.text_set[0].text && (
<>
<HorizontalLine />
<TOC
text={content.text_set[0].text}
title={
content.titles.length > 0
? prettyinlineTitle(
content.titles[0].pre_title,
content.titles[0].title,
content.titles[0].subtitle
)
: prettySlug(content.slug)
}
/>
</>
)}
</SubPanel>
);
const contentPanel = (
@ -172,7 +176,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
<HorizontalLine />
{content.text_set.length > 0 && (
{content.text_set.length > 0 && content.text_set[0].text && (
<Markdawn text={content.text_set[0].text} />
)}
</div>

View File

@ -19,14 +19,12 @@ import { useRouter } from "next/router";
import ReactTooltip from "react-tooltip";
import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
interface DataChronologyProps extends AppStaticProps {
interface ChronologyProps extends AppStaticProps {
chronologyItems: GetChronologyItemsQuery["chronologyItems"]["data"];
chronologyEras: GetErasQuery["chronologyEras"]["data"];
}
export default function DataChronology(
props: DataChronologyProps
): JSX.Element {
export default function Chronology(props: ChronologyProps): JSX.Element {
useTesting(props);
const { chronologyItems, chronologyEras } = props;
@ -133,7 +131,7 @@ export default function DataChronology(
}
export const getStaticProps: GetStaticProps = async (context) => {
const props: DataChronologyProps = {
const props: ChronologyProps = {
...(await getAppStaticProps(context)),
chronologyItems: (
await getChronologyItems({
@ -148,7 +146,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
};
};
function useTesting(props: DataChronologyProps) {
function useTesting(props: ChronologyProps) {
const router = useRouter();
const { chronologyItems, chronologyEras } = props;
chronologyEras.map((era) => {

View File

@ -6,7 +6,7 @@ import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
interface WikiProps extends AppStaticProps {}
export default function Hubs(props: WikiProps): JSX.Element {
export default function Wiki(props: WikiProps): JSX.Element {
const { langui } = props;
const subPanel = (
<SubPanel>

View File

@ -72,7 +72,6 @@ module.exports = {
},
},
plugins: [
require("@tailwindcss/typography"),
plugin(function ({ addUtilities }) {
addUtilities({