30 lines
745 B
TypeScript
30 lines
745 B
TypeScript
import React from "react"
|
|
import ReactDOM from "react-dom"
|
|
import "./index.scss"
|
|
import App from "./App"
|
|
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client"
|
|
|
|
const client = new ApolloClient({
|
|
uri: "/graphql",
|
|
cache: new InMemoryCache()
|
|
})
|
|
|
|
// 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)
|
|
|
|
ReactDOM.render(
|
|
<React.StrictMode>
|
|
<ApolloProvider client={client}>
|
|
<App />
|
|
</ApolloProvider>
|
|
</React.StrictMode>,
|
|
document.getElementById("root")
|
|
)
|