File tree Expand file tree Collapse file tree
packages/diracx-web-components/src/components/DashboardLayout Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,6 +25,8 @@ interface DashboardProps {
2525 drawerWidth ?: number ;
2626 /** The URL of the logo to be displayed in the drawer */
2727 logoURL ?: string ;
28+ /** The URL for the documentation link in the drawer */
29+ documentationURL ?: string ;
2830}
2931
3032/**
@@ -38,6 +40,7 @@ export default function Dashboard({
3840 children,
3941 drawerWidth = 240 ,
4042 logoURL,
43+ documentationURL,
4144} : DashboardProps ) {
4245 const appTitle = useApplicationTitle ( ) ;
4346 const appType = useApplicationType ( ) ;
@@ -142,6 +145,7 @@ export default function Dashboard({
142145 width = { drawerWidth }
143146 handleDrawerToggle = { handleDrawerToggle }
144147 logoURL = { logoURL }
148+ documentationURL = { documentationURL }
145149 />
146150 </ Box >
147151 < Box
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ interface DashboardDrawerProps {
3636 handleDrawerToggle : React . ReactEventHandler ;
3737 /** The URL for the logo image. */
3838 logoURL ?: string ;
39+ /** The URL for the documentation link. */
40+ documentationURL ?: string ;
3941}
4042
4143/**
@@ -51,6 +53,7 @@ export default function DashboardDrawer({
5153 width,
5254 handleDrawerToggle,
5355 logoURL = "/DIRAC-logo.png" ,
56+ documentationURL,
5457} : DashboardDrawerProps ) {
5558 // Determine the container for the Drawer based on whether the window object exists.
5659 const container =
@@ -366,6 +369,9 @@ export default function DashboardDrawer({
366369 handleCloseContextMenu ( ) ;
367370 } ;
368371
372+ // Use provided documentationURL or fallback to default
373+ const docURL = documentationURL || "https://diracx.io" ;
374+
369375 return (
370376 < >
371377 < Drawer
@@ -443,10 +449,7 @@ export default function DashboardDrawer({
443449 </ ListItemButton >
444450 </ ListItem >
445451 < ListItem key = { "Documentation" } >
446- < ListItemButton
447- target = "_blank"
448- href = "https://dirac.readthedocs.io/en/latest/"
449- >
452+ < ListItemButton target = "_blank" href = { docURL } >
450453 < ListItemIcon > { < MenuBook /> } </ ListItemIcon >
451454 < ListItemText primary = { "Documentation" } />
452455 </ ListItemButton >
You can’t perform that action at this time.
0 commit comments