Skip to content

Commit

Permalink
fix(main): change toast position and update reactDom
Browse files Browse the repository at this point in the history
  • Loading branch information
Mihoub2 committed Jun 13, 2024
1 parent 9e68185 commit 389a5bb
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import React, { ReactNode } from "react";
import ReactDOM from "react-dom";
import ReactDOM from "react-dom/client";

import { BrowserRouter, Link } from "react-router-dom";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { ToastContainer } from "react-toastify";
import "react-toastify/dist/ReactToastify.min.css";
import { BrowserRouter, Link } from "react-router-dom";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

import Router from "./router";
import { DSFRConfig } from "@dataesr/dsfr-plus";
Expand Down Expand Up @@ -32,12 +33,13 @@ const RouterLink = ({ href, replace, target, ...props }: RouterLinkProps) => {
return <Link to={href} replace={replace} {...props} />;
};

ReactDOM.render(
ReactDOM.createRoot(document.getElementById("root")!).render(
<React.StrictMode>
<DataListProvider>
<BrowserRouter>
<DSFRConfig routerComponent={RouterLink}>
<ToastContainer
position="bottom-right"
toastStyle={{
backgroundColor: "#dffee6",
color: "#0078f3",
Expand All @@ -51,6 +53,5 @@ ReactDOM.render(
</DSFRConfig>
</BrowserRouter>
</DataListProvider>
</React.StrictMode>,
document.getElementById("root")
</React.StrictMode>
);

0 comments on commit 389a5bb

Please sign in to comment.