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"/> <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>

View file

@ -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(),

View file

@ -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)} />

View file

@ -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(),

View file

@ -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(),