Skip to content

Commit

Permalink
fix(playground): fixing build errors (#48)
Browse files Browse the repository at this point in the history
* fix: playground oopsies

* fix: workflows
  • Loading branch information
distractedm1nd authored Jun 18, 2024
1 parent da903c7 commit b1b3de2
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ jobs:
uses: actions/checkout@v2

- name: ⎔ Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
Expand All @@ -36,12 +36,12 @@ jobs:
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: ⎔ Setup node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18

- name: 📥 Download deps
uses: bahmutov/npm-install@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: '16'
node-version: '18'
cache: ${{ steps.detect-package-manager.outputs.manager }}
- name: Setup Pages
uses: actions/configure-pages@v3
Expand Down
6 changes: 4 additions & 2 deletions src/components/Playground.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import {
Dialog,
DialogPanel,
Expand Down Expand Up @@ -220,7 +221,7 @@ const Playground = ({
}}
className='mt-3 min-h-52'
value={currentRequest}
onChange={(value) =>
onChange={(value: any) =>
value &&
value != currentResponse &&
setCurrentRequest(value)
Expand Down Expand Up @@ -291,10 +292,11 @@ const Playground = ({
setCurrentResponse(JSON.stringify(data, null, 2));
setCurrentTab(1);
if ('error' in data) {
const nodeError = data as any;
setNotification({
active: true,
success: false,
message: (data.error as NodeError).message,
message: (nodeError.error as NodeError).message,
});
} else {
setNotification({
Expand Down
3 changes: 2 additions & 1 deletion src/lib/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { Method } from './types';

type OpenGraphType = {
siteName: string;
Expand Down Expand Up @@ -52,7 +53,7 @@ export const getExampleRequest = (pkg: string, method: Method): string => {
id: 1,
jsonrpc: '2.0',
method: pkg + '.' + method.name,
params: method.params.map((param) =>
params: method.params.map((param: any) =>
param.schema && param.schema.examples
? param.schema.examples[0]
: undefined
Expand Down

0 comments on commit b1b3de2

Please sign in to comment.