Merge branch 'dev' into debian12
This commit is contained in:
@@ -2,7 +2,7 @@ import { StrictMode } from "react";
|
|||||||
import { createRoot } from "react-dom/client";
|
import { createRoot } from "react-dom/client";
|
||||||
import "./index.css";
|
import "./index.css";
|
||||||
import App from "./App.tsx";
|
import App from "./App.tsx";
|
||||||
import { ToastContainer } from "react-toastify";
|
import { ToastContainer, Flip } from "react-toastify";
|
||||||
import "react-toastify/dist/ReactToastify.css";
|
import "react-toastify/dist/ReactToastify.css";
|
||||||
import { QueryClientProvider } from "@tanstack/react-query";
|
import { QueryClientProvider } from "@tanstack/react-query";
|
||||||
import { queryClient } from "./utils/queryClient";
|
import { queryClient } from "./utils/queryClient";
|
||||||
@@ -18,11 +18,11 @@ createRoot(document.getElementById("root")!).render(
|
|||||||
newestOnTop
|
newestOnTop
|
||||||
closeOnClick
|
closeOnClick
|
||||||
rtl={false}
|
rtl={false}
|
||||||
pauseOnFocusLoss={false}
|
pauseOnFocusLoss
|
||||||
draggable
|
draggable
|
||||||
pauseOnHover
|
pauseOnHover
|
||||||
theme="colored"
|
theme="colored"
|
||||||
style={{ zIndex: 9999 }}
|
transition={Flip}
|
||||||
/>
|
/>
|
||||||
</QueryClientProvider>
|
</QueryClientProvider>
|
||||||
</StrictMode>
|
</StrictMode>
|
||||||
|
@@ -1,17 +1,18 @@
|
|||||||
import { toast, type ToastOptions } from "react-toastify";
|
import { toast, Flip, type ToastOptions } from "react-toastify";
|
||||||
|
|
||||||
export type ToastType = "success" | "error" | "info" | "warning";
|
export type ToastType = "success" | "error" | "info" | "warning";
|
||||||
|
|
||||||
export const myToast = (message: string, msgType: ToastType) => {
|
export const myToast = (message: string, msgType: ToastType) => {
|
||||||
let config: ToastOptions = {
|
let config: ToastOptions = {
|
||||||
position: "top-right",
|
position: "top-right",
|
||||||
autoClose: 5000,
|
autoClose: 3000,
|
||||||
hideProgressBar: false,
|
hideProgressBar: false,
|
||||||
closeOnClick: true,
|
closeOnClick: true,
|
||||||
pauseOnHover: true,
|
pauseOnHover: true,
|
||||||
draggable: true,
|
draggable: true,
|
||||||
progress: undefined,
|
progress: undefined,
|
||||||
theme: "light",
|
theme: "colored",
|
||||||
|
transition: Flip,
|
||||||
};
|
};
|
||||||
toast[msgType](message, config);
|
toast[msgType](message, config);
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user