From 6527c6d5f73fe843362bcc2a1913b8a51ae8a532 Mon Sep 17 00:00:00 2001 From: Tyler Hallada Date: Fri, 18 Mar 2022 23:41:06 -0400 Subject: [PATCH] Display parse errors on PluginDetail page --- components/PluginDetail.tsx | 7 ++++++- styles/PluginDetail.module.css | 4 ++++ 2 files changed, 10 insertions(+), 1 deletion(-) create mode 100644 styles/PluginDetail.module.css diff --git a/components/PluginDetail.tsx b/components/PluginDetail.tsx index e773584..1498a04 100644 --- a/components/PluginDetail.tsx +++ b/components/PluginDetail.tsx @@ -11,7 +11,7 @@ import ModList from "./ModList"; import CellList from "./CellList"; import type { CellCoord } from "./ModData"; import PluginData, { Plugin as PluginProps } from "./PluginData"; -import styles from "../styles/PluginData.module.css"; +import styles from "../styles/PluginDetail.module.css"; import { jsonFetcher } from "../lib/api"; const buildPluginProps = ( @@ -79,6 +79,11 @@ const PluginDetail: React.FC = ({ hash, counts }) => { <> {data && } + {plugin?.parseError && ( +
+ {`Error parsing plugin: ${plugin.parseError}`} +
+ )}