frontend: react-mount -> react-root
This commit is contained in:
parent
18c958be67
commit
64b457d893
5 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@
|
||||||
<link rel="icon" href="/favicon.svg"/>
|
<link rel="icon" href="/favicon.svg"/>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="wrapper react-mount w-full"></div>
|
<div class="react-root w-full wrapper"></div>
|
||||||
<script src="<%= src %>"></script>
|
<script src="<%= src %>"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Projects } from "/components/Projects";
|
||||||
import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";
|
import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const root = document.querySelector(".react-mount")!;
|
const root = document.querySelector(".react-root")!;
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
uri: "/servlet/graphql",
|
uri: "/servlet/graphql",
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
|
|
|
@ -15,7 +15,7 @@ import { ApolloClient, InMemoryCache } from "@apollo/client";
|
||||||
uri: "/servlet/graphql",
|
uri: "/servlet/graphql",
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
});
|
});
|
||||||
const root = document.querySelector(".react-mount")!;
|
const root = document.querySelector(".react-root")!;
|
||||||
ReactDOM.createRoot(root).render(
|
ReactDOM.createRoot(root).render(
|
||||||
<ApolloProvider client={client}>
|
<ApolloProvider client={client}>
|
||||||
<Component taskId={Number(params.id)} />
|
<Component taskId={Number(params.id)} />
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { Task } from "/components/Task";
|
||||||
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
|
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const root = document.querySelector(".react-mount")!;
|
const root = document.querySelector(".react-root")!;
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
uri: "/servlet/graphql",
|
uri: "/servlet/graphql",
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
|
|
|
@ -4,7 +4,7 @@ import ReactDOM from "react-dom/client";
|
||||||
import { Tasks } from "/components/Tasks";
|
import { Tasks } from "/components/Tasks";
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
const root = document.querySelector(".react-mount")!;
|
const root = document.querySelector(".react-root")!;
|
||||||
const client = new ApolloClient({
|
const client = new ApolloClient({
|
||||||
uri: "/servlet/graphql",
|
uri: "/servlet/graphql",
|
||||||
cache: new InMemoryCache(),
|
cache: new InMemoryCache(),
|
||||||
|
|
Loading…
Reference in a new issue