frontend: react-mount -> react-root

This commit is contained in:
0x1eef 2024-01-13 06:46:02 -03:00
parent 18c958be67
commit 64b457d893
5 changed files with 5 additions and 5 deletions

View file

@ -7,7 +7,7 @@
<link rel="icon" href="/favicon.svg"/>
</head>
<body>
<div class="wrapper react-mount w-full"></div>
<div class="react-root w-full wrapper"></div>
<script src="<%= src %>"></script>
</body>
</html>

View file

@ -4,7 +4,7 @@ import { Projects } from "/components/Projects";
import { ApolloProvider, ApolloClient, InMemoryCache } from "@apollo/client";
(function () {
const root = document.querySelector(".react-mount")!;
const root = document.querySelector(".react-root")!;
const client = new ApolloClient({
uri: "/servlet/graphql",
cache: new InMemoryCache(),

View file

@ -15,7 +15,7 @@ import { ApolloClient, InMemoryCache } from "@apollo/client";
uri: "/servlet/graphql",
cache: new InMemoryCache(),
});
const root = document.querySelector(".react-mount")!;
const root = document.querySelector(".react-root")!;
ReactDOM.createRoot(root).render(
<ApolloProvider client={client}>
<Component taskId={Number(params.id)} />

View file

@ -4,7 +4,7 @@ import { Task } from "/components/Task";
import { ApolloClient, ApolloProvider, InMemoryCache } from "@apollo/client";
(function () {
const root = document.querySelector(".react-mount")!;
const root = document.querySelector(".react-root")!;
const client = new ApolloClient({
uri: "/servlet/graphql",
cache: new InMemoryCache(),

View file

@ -4,7 +4,7 @@ import ReactDOM from "react-dom/client";
import { Tasks } from "/components/Tasks";
(function () {
const root = document.querySelector(".react-mount")!;
const root = document.querySelector(".react-root")!;
const client = new ApolloClient({
uri: "/servlet/graphql",
cache: new InMemoryCache(),