2021-07-26 12:54:22 +00:00
|
|
|
import React from "react"
|
|
|
|
import ReactDOM from "react-dom"
|
|
|
|
import "./index.scss"
|
|
|
|
import App from "./App"
|
|
|
|
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client"
|
2021-08-10 09:21:18 +00:00
|
|
|
import "react-contexify/dist/ReactContexify.css"
|
2021-07-26 12:54:22 +00:00
|
|
|
|
|
|
|
const client = new ApolloClient({
|
2021-08-27 19:17:10 +00:00
|
|
|
uri: "/api/graphql",
|
2021-07-26 12:54:22 +00:00
|
|
|
cache: new InMemoryCache()
|
|
|
|
})
|
|
|
|
|
2021-08-01 19:42:11 +00:00
|
|
|
// Disable drag and drop behaviour on document
|
|
|
|
function disable(event: DragEvent) {
|
|
|
|
event.preventDefault()
|
|
|
|
event.stopPropagation()
|
|
|
|
}
|
|
|
|
document.addEventListener("dragenter",disable)
|
|
|
|
document.addEventListener("dragleave",disable)
|
|
|
|
document.addEventListener("dragover",disable)
|
|
|
|
document.addEventListener("drop",disable)
|
|
|
|
|
2021-07-26 12:54:22 +00:00
|
|
|
ReactDOM.render(
|
|
|
|
<React.StrictMode>
|
|
|
|
<ApolloProvider client={client}>
|
|
|
|
<App />
|
|
|
|
</ApolloProvider>
|
|
|
|
</React.StrictMode>,
|
|
|
|
document.getElementById("root")
|
|
|
|
)
|