import { NextPage } from "next";
import { useEffect, useState } from "react";
import NoSSR from "react-no-ssr";
import { Provider } from "react-redux";
import styles from "~/components/styles.module.scss";
import { GRAPHQL_ENDPOINT } from "~/components/hooks/with-apollo";
const PlaygroundPage: NextPage<{}> = () => (
Loading...>}>
);
const Playground: React.FC<{}> = () => {
const [playground, setPlayground] = useState<
typeof import("@apollographql/graphql-playground-react")
>();
useEffect(() => {
import("@apollographql/graphql-playground-react").then(playground => {
setPlayground(playground);
});
}, []);
if (typeof window === "undefined") {
return
javascript required
;
} else {
if (!playground) {
return loading
;
} else {
return (
);
}
}
};
export default PlaygroundPage;