Skip to content

Commit

Permalink
chore(validator): Update react-json-view (#64)
Browse files Browse the repository at this point in the history
* chore(validator): Update react-json-view

* chore(deps): migrate to pnpm

---------

Co-authored-by: Glare <admin@glaremasters.me>
  • Loading branch information
Starmism and darbyjack authored Oct 10, 2023
1 parent c56ba7b commit f35f667
Show file tree
Hide file tree
Showing 5 changed files with 3,541 additions and 3,045 deletions.
8 changes: 5 additions & 3 deletions components/Validator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ import Head from "next/head";
import tw, { css } from "twin.macro";
import { TextBox } from "./TextBox";
import { useEffect, useState } from "react";
import dynamic from "next/dynamic";
import duotoneDark from "prism-react-renderer/themes/duotoneDark";
import { useRouter } from "next/router";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faLink } from "@fortawesome/free-solid-svg-icons";
import { ConversionError } from "../converters/converter";
import dynamic from "next/dynamic";

const ReactJson = dynamic(import("react-json-view"), { ssr: false });
const JsonView = dynamic(() => import("@microlink/react-json-view"), {
ssr: false
});

const Validator = ({
language,
Expand Down Expand Up @@ -112,7 +114,7 @@ const Validator = ({
>
<div css={tw`py-2 px-4 text-base`}>
{!(error || !parsedConfig) ? (
<ReactJson
<JsonView
src={parsedConfig}
theme={{
base00: duotoneDark.plain.backgroundColor ?? "",
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,22 @@
"generateschema": "ts-node --project tsnodeconfig.json cli/generateschema.ts",
"dev": "next dev",
"build": "next build",
"start": "next start",
"format": "yarn prettier --write ."
"start": "next start"
},
"dependencies": {
"@fortawesome/fontawesome-free": "6.4.0",
"@fortawesome/fontawesome-svg-core": "6.4.0",
"@fortawesome/free-solid-svg-icons": "6.4.0",
"@fortawesome/react-fontawesome": "0.2.0",
"@js.properties/properties": "0.5.4",
"@microlink/react-json-view": "^1.22.2",
"@tkint/hocon-parser": "0.0.0-alpha.0",
"ajv": "8.12.0",
"next": "12.3.4",
"prism-react-renderer": "1.3.5",
"prismjs": "1.29.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-json-view": "1.21.3",
"react-simple-code-editor": "0.13.1",
"styled-components": "5.3.9",
"toml": "3.0.0",
Expand Down
2 changes: 0 additions & 2 deletions pages/converters/legacy/minimessage.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import type {NextPage} from "next";
import Converter from "../../../components/Converter";
import MiniMessage from "../../../converters/minimessage";
import {ConversionError} from "../../../converters/converter";
import {string} from "prop-types";

const LegacyToMiniMessage: NextPage = () => (
<Converter
Expand Down
Loading

0 comments on commit f35f667

Please sign in to comment.