Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
import { BrowserRouter as Router, Routes, Route, Navigate } from "react-router-dom";
import { AuthenticatedTemplate, UnauthenticatedTemplate } from "@azure/msal-react"; // Assuming you use Azure for authentication
import useAxiosInterceptor from "./hooks/useAxiosInterceptor"; // Assuming this is a custom hook
import ToastContainer from "./ToastContainer"; // Import the ToastContainer
// Import your components
import Header from "./components/Header";
import NotificationContainer from "./components/NotificationContainer";
import AdjustmentCalculation from "./pages/AdjustmentCalculation";
import PreviewSummary from "./pages/PreviewSummary";
import ReviewPremium from "./pages/ReviewPremium";
import Checkout from "./pages/Checkout";
import TwoCheckoutitem from "./pages/TwoCheckoutitem";
import CheckoutOrder from "./pages/CheckoutOrder";
import NotFoundPage from "./pages/NotFoundPage";
import AboutYourSelf from "./pages/AboutYourSelf";
import Account from "./pages/Account";
import ReviewAdjustment from "./pages/ReviewAdjustment";
import SupportHomepage from "./pages/SupportHomepage";
import Login from "./pages/Login";
import PolicyDashboard from "./pages/PolicyDashboard";
import Policydetails from "./pages/Policydetails";
import CalculatePremium from "./pages/CalculatePremium";
const App = () => {
const toastContainerRef = useRef(); // Create a reference for the ToastContainer
// Initialize Axios Interceptor (assuming it's a custom hook for intercepting API requests)
useAxiosInterceptor();
// Trigger Toast from anywhere in your app
const triggerToast = (message, type = "info") => {
toastContainerRef.current.addToast(message, type); // Add toast notification
};
return (
<>
{/* Authenticated Template */}
<AuthenticatedTemplate>
<Router>
<Header />
<ToastContainer ref={toastContainerRef} /> {/* Toast Container for global notifications */}
<NotificationContainer /> {/* Custom notification component, if any */}
<Routes>
<Route path="/adjustmentcalculation" element={<AdjustmentCalculation />} />
<Route path="/previewsummary" element={<PreviewSummary />} />
<Route path="/calculatepremium/reviewpremium" element={<ReviewPremium />} />
<Route path="/Checkout" element={<Checkout />} />
<Route path="/TwoCheckoutitem" element={<TwoCheckoutitem />} />
<Route path="/checkoutorder" element={<CheckoutOrder />} />
<Route path="/notfoundpage" element={<NotFoundPage />} />
<Route path="/aboutYourself" element={<AboutYourSelf />} />
<Route path="/account" element={<Account />} />
<Route path="/adjustmentcalculation/reviewadjustment" element={<ReviewAdjustment />} />
<Route path="/SupportHomepage" element={<SupportHomepage />} />
{/* Other routes */}
</Routes>
</Router>
</AuthenticatedTemplate>
{/* Unauthenticated Template */}
<UnauthenticatedTemplate>
<Router>
<Routes>
<Route path="/" element={<Login />} />
<Route path="*" element={<Navigate to="/" />} />
</Routes>
</Router>
</UnauthenticatedTemplate>
</>
);
};
export default App;
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team