ballerine-io / ballerine

Open-source infrastructure and data orchestration platform for risk decisioning

Home Page:https://www.ballerine.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Welcome - Navigation and Routing

alonp99 opened this issue · comments

Description

Add a "Home" page to the navigation bar, represented by the Home icon.
Integrate the new "Statistics" and "Cases" routes into the application's routing structure within the authenticated layout.
Modify authentication redirects to point to the "Statistics" page.
Code References (Example):

 // useNavbarLogic.tsx
 import { Home } from 'lucide-react';

 const navItems = [ 
     {
         label: 'Home',
         href: '/en/statistics',
         icon: Home 
     }, 
     // ...existing navItems
 ]; 

// Router.tsx

{
        element: <AuthenticatedLayout />,
        loader: authenticatedLayoutLoader,
        errorElement: <RouteError />,
        children: [
          {
            path: '/:locale',
            element: <Locale />,
            errorElement: <RouteError />,
            children: [
                // ... existing children
               {
                path: '/:locale/statistics',
                element: <Statistics />,
                errorElement: <RouteError />,
               },
              {
                path: '/:locale/workflows',
                element: <Workflows />,
                errorElement: <RouteError />,
               }
            ]
           }
        ]
}

// Providers.tsx

      <AuthProvider
        redirectAuthenticatedTo={'/en/statistics'}
        signInOptions={{
          callbackUrl: state?.from
            ? ...
            : '/en/statistics',
        }}
       // ...rest of props
      >