Skip to content

Commit

Permalink
Merge pull request #335 from open-rpc/fix/bump-update-docs-react
Browse files Browse the repository at this point in the history
fix: bump docs-react
  • Loading branch information
shanejonas committed Jan 24, 2020
2 parents 72fc163 + 02eb82f commit 66cbd83
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -16,7 +16,7 @@
"@etclabscore/react-monaco-editor": "^1.0.3",
"@material-ui/core": "^4.7.2",
"@material-ui/icons": "^3.0.2",
"@open-rpc/docs-react": "^1.1.4",
"@open-rpc/docs-react": "^1.1.5",
"@open-rpc/examples": "^1.3.3",
"@open-rpc/inspector": "^1.2.8",
"@open-rpc/meta-schema": "^1.4.3",
Expand Down
34 changes: 18 additions & 16 deletions src/App.tsx
Expand Up @@ -9,7 +9,7 @@ import { IUISchema } from "./UISchema";
import { SnackBar, ISnackBarNotification, NotificationType } from "./SnackBar/SnackBar";
import { MuiThemeProvider } from "@material-ui/core/styles";
import { lightTheme, darkTheme } from "./themes/openrpcTheme";
import { CssBaseline } from "@material-ui/core";
import { CssBaseline, Container } from "@material-ui/core";
import PlaygroundSplitPane from "./PlaygroundSplitPane";
import useParsedSchema from "./hooks/useParsedSchema";
import useDefaultEditorValue from "./hooks/useDefaultEditorValue";
Expand Down Expand Up @@ -41,15 +41,15 @@ const App: React.FC = () => {
if (!defaultValue && !searchUrl && defaultExample) {
setSearchUrl(defaultExample.url);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultValue]);

useEffect(() => {
setReactJsonOptions({
...reactJsonOptions,
theme: UISchema.appBar["ui:darkMode"] ? "summerfruit" : "summerfruit:inverted",
});
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [UISchema.appBar["ui:darkMode"]]);

useInterval(() => {
Expand All @@ -68,7 +68,7 @@ const App: React.FC = () => {
if (results) {
setParsedSchema(results);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [results]);

useEffect(() => {
Expand All @@ -83,7 +83,7 @@ const App: React.FC = () => {
const [parsedSchema, setParsedSchema] = useParsedSchema(defaultValue ? JSON.parse(defaultValue) : null);
useEffect(() => {
setParsedSchema(defaultValue);
// eslint-disable-next-line react-hooks/exhaustive-deps
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [defaultValue]);
const [reactJsonOptions, setReactJsonOptions] = useState({
theme: "summerfruit:inverted",
Expand Down Expand Up @@ -117,7 +117,7 @@ const App: React.FC = () => {
});
}}
onChangeUrl={setSearchUrl}
/>
/>
<PlaygroundSplitPane
split={UISchema.appBar["ui:splitView"]}
left={
Expand All @@ -133,16 +133,18 @@ const App: React.FC = () => {
</>
}
right={
<Documentation
schema={parsedSchema as any}
uiSchema={UISchema}
reactJsonOptions={reactJsonOptions}
methodPlugins={
UISchema.methods["ui:methodPlugins"]
? [InspectorPlugin]
: undefined
}
/>
<Container>
<Documentation
schema={parsedSchema as any}
uiSchema={UISchema}
reactJsonOptions={reactJsonOptions}
methodPlugins={
UISchema.methods["ui:methodPlugins"]
? [InspectorPlugin]
: undefined
}
/>
</Container>
}
/>
<SnackBar
Expand Down

0 comments on commit 66cbd83

Please sign in to comment.