fix build issues

pull/3475/head
Solid Studio 4 years ago committed by Aniket
parent dd4f8cd3b7
commit 2d6b4d94d4
  1. 3
      src/AppContext.tsx
  2. 2
      src/index.tsx
  3. 3
      src/utils/template.ts
  4. 9
      src/utils/utils.ts
  5. 2
      src/views/ErrorView.tsx
  6. 2
      src/views/HomeView.tsx

@ -3,8 +3,7 @@ import {
PluginApi,
IRemixApi,
Api,
PluginClient,
CompilationResult,
PluginClient
} from "@remixproject/plugin";
import { ContractName, Documentation, PublishedSite } from "./types";

@ -1,7 +1,7 @@
import React from "react";
import ReactDOM from "react-dom";
import App from "./App";
import { Routes } from "./routes";
// import { Routes } from "./routes";
ReactDOM.render(
<React.StrictMode>

@ -2,7 +2,6 @@ import {
FunctionDocumentation,
TemplateDoc,
MethodDoc,
ContractDoc,
ContractDocumentation,
ParameterDocumentation,
} from "./types";
@ -147,7 +146,7 @@ export const getMethodDetails = (devMethod?: Partial<MethodDoc>) => {
: Object.keys(devMethod)
.filter((key) => key !== "params")
.map((key) => {
(devMethodDocTemplate as any)[key]((devMethod as any)[key]);
return (devMethodDocTemplate as any)[key]((devMethod as any)[key]);
})
.join("\n");
};

@ -2,16 +2,11 @@ import {
CompilationResult,
CompiledContract,
FunctionDescription,
ABIDescription,
DevMethodDoc,
UserMethodDoc,
ABIParameter,
DeveloperDocumentation,
UserDocumentation,
ABIDescription
} from "@remixproject/plugin";
import {
EthDocumentation,
FileName,
Documentation,
ContractName,
@ -73,7 +68,7 @@ export const getContractDoc = (name: string, contract: CompiledContract) => {
export const getContractDocumentation = (contract: CompiledContract) => {
const methods: MethodsDocumentation = {};
Object.keys(contract.userdoc.methods).map((item) => {
Object.keys(contract.userdoc.methods).forEach((item) => {
if (contract.devdoc.methods[item]) {
const finalResult = {
...contract.userdoc.methods[item],

@ -19,7 +19,7 @@ export const ErrorView: React.FC = () => {
<h5>Sorry, something unexpected happened. </h5>
<h5>
Please raise an issue:{" "}
<a style={{ color: "red" }} href="">
<a style={{ color: "red" }} href="https://github.com/Machinalabs/remix-ethdoc-plugin/issues">
Here
</a>
</h5>

@ -27,7 +27,7 @@ export const HomeView: React.FC = () => {
if (isPublishing) {
publishDocumentation();
}
}, [isPublishing]);
}, [isPublishing, htmlDocumentation]);
const displayDocumentation = (
client: any,

Loading…
Cancel
Save