Fixed errors that prevented building
This commit is contained in:
parent
b213447c49
commit
28ac9012ff
|
@ -6,7 +6,7 @@ export type SwitchProps = {
|
||||||
className?: string;
|
className?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function Select(props: SwitchProps): JSX.Element {
|
export default function Switch(props: SwitchProps): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={`h-6 w-12 rounded-full border-2 border-mid grid transition-colors relative cursor-pointer ${
|
className={`h-6 w-12 rounded-full border-2 border-mid grid transition-colors relative cursor-pointer ${
|
||||||
|
|
|
@ -143,19 +143,23 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
<HorizontalLine />
|
{content.text_set.length > 0 && content.text_set[0].text && (
|
||||||
<TOC
|
<>
|
||||||
text={content.text_set[0].text}
|
<HorizontalLine />
|
||||||
title={
|
<TOC
|
||||||
content.titles.length > 0
|
text={content.text_set[0].text}
|
||||||
? prettyinlineTitle(
|
title={
|
||||||
content.titles[0].pre_title,
|
content.titles.length > 0
|
||||||
content.titles[0].title,
|
? prettyinlineTitle(
|
||||||
content.titles[0].subtitle
|
content.titles[0].pre_title,
|
||||||
)
|
content.titles[0].title,
|
||||||
: prettySlug(content.slug)
|
content.titles[0].subtitle
|
||||||
}
|
)
|
||||||
/>
|
: prettySlug(content.slug)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
</SubPanel>
|
</SubPanel>
|
||||||
);
|
);
|
||||||
const contentPanel = (
|
const contentPanel = (
|
||||||
|
@ -172,7 +176,7 @@ export default function ContentRead(props: ContentReadProps): JSX.Element {
|
||||||
|
|
||||||
<HorizontalLine />
|
<HorizontalLine />
|
||||||
|
|
||||||
{content.text_set.length > 0 && (
|
{content.text_set.length > 0 && content.text_set[0].text && (
|
||||||
<Markdawn text={content.text_set[0].text} />
|
<Markdawn text={content.text_set[0].text} />
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -19,14 +19,12 @@ import { useRouter } from "next/router";
|
||||||
import ReactTooltip from "react-tooltip";
|
import ReactTooltip from "react-tooltip";
|
||||||
import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
|
import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
|
||||||
|
|
||||||
interface DataChronologyProps extends AppStaticProps {
|
interface ChronologyProps extends AppStaticProps {
|
||||||
chronologyItems: GetChronologyItemsQuery["chronologyItems"]["data"];
|
chronologyItems: GetChronologyItemsQuery["chronologyItems"]["data"];
|
||||||
chronologyEras: GetErasQuery["chronologyEras"]["data"];
|
chronologyEras: GetErasQuery["chronologyEras"]["data"];
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DataChronology(
|
export default function Chronology(props: ChronologyProps): JSX.Element {
|
||||||
props: DataChronologyProps
|
|
||||||
): JSX.Element {
|
|
||||||
useTesting(props);
|
useTesting(props);
|
||||||
const { chronologyItems, chronologyEras } = props;
|
const { chronologyItems, chronologyEras } = props;
|
||||||
|
|
||||||
|
@ -133,7 +131,7 @@ export default function DataChronology(
|
||||||
}
|
}
|
||||||
|
|
||||||
export const getStaticProps: GetStaticProps = async (context) => {
|
export const getStaticProps: GetStaticProps = async (context) => {
|
||||||
const props: DataChronologyProps = {
|
const props: ChronologyProps = {
|
||||||
...(await getAppStaticProps(context)),
|
...(await getAppStaticProps(context)),
|
||||||
chronologyItems: (
|
chronologyItems: (
|
||||||
await getChronologyItems({
|
await getChronologyItems({
|
||||||
|
@ -148,7 +146,7 @@ export const getStaticProps: GetStaticProps = async (context) => {
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
function useTesting(props: DataChronologyProps) {
|
function useTesting(props: ChronologyProps) {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { chronologyItems, chronologyEras } = props;
|
const { chronologyItems, chronologyEras } = props;
|
||||||
chronologyEras.map((era) => {
|
chronologyEras.map((era) => {
|
||||||
|
|
|
@ -6,7 +6,7 @@ import { AppStaticProps, getAppStaticProps } from "queries/getAppStaticProps";
|
||||||
|
|
||||||
interface WikiProps extends AppStaticProps {}
|
interface WikiProps extends AppStaticProps {}
|
||||||
|
|
||||||
export default function Hubs(props: WikiProps): JSX.Element {
|
export default function Wiki(props: WikiProps): JSX.Element {
|
||||||
const { langui } = props;
|
const { langui } = props;
|
||||||
const subPanel = (
|
const subPanel = (
|
||||||
<SubPanel>
|
<SubPanel>
|
||||||
|
|
|
@ -72,7 +72,6 @@ module.exports = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
plugins: [
|
plugins: [
|
||||||
require("@tailwindcss/typography"),
|
|
||||||
|
|
||||||
plugin(function ({ addUtilities }) {
|
plugin(function ({ addUtilities }) {
|
||||||
addUtilities({
|
addUtilities({
|
||||||
|
|
Loading…
Reference in New Issue