Skip to content

Commit

Permalink
merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
roshaans committed Jun 12, 2023
1 parent 16f097f commit 6e6e1d5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions frontend/src/components/Playground/graphiql.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useContext } from "react";
import React, { useContext, useState } from "react";
import GraphiQL from "graphiql";
import { sessionStorage } from "near-social-bridge";
import "graphiql/graphiql.min.css";
Expand Down Expand Up @@ -27,11 +27,6 @@ const graphQLFetcher = async (graphQLParams, accountId) => {

export const GraphqlPlayground = () => {
const { indexerDetails } = useContext(IndexerDetailsContext);
return (
<div style={{ width: "100%", height: "75vh" }}>
<GraphiQL
fetcher={(params) => graphQLFetcher(params, indexerDetails.accountId)}
export const GraphqlPlayground = ({ accountId }) => {
const [query, setQuery] = useState("");
const explorerPlugin = useExplorerPlugin({
query,
Expand All @@ -40,7 +35,7 @@ export const GraphqlPlayground = ({ accountId }) => {
return (
<div style={{ width: "100%", height: "75vh" }}>
<GraphiQL
fetcher={(params) => graphQLFetcher(params, accountId)}
fetcher={(params) => graphQLFetcher(params, indexerDetails.accountId)}
query={query}
onEditQuery={setQuery}
plugins={[explorerPlugin]}
Expand Down

0 comments on commit 6e6e1d5

Please sign in to comment.