@@ -4,14 +4,11 @@ import { useState } from "react";
44import AppBar from "@mui/material/AppBar" ;
55import Box from "@mui/material/Box" ;
66import IconButton from "@mui/material/IconButton" ;
7- import { Menu } from "@mui/icons-material" ;
7+ import Menu from "@mui/icons-material/Menu " ;
88import Toolbar from "@mui/material/Toolbar" ;
99import Stack from "@mui/material/Stack" ;
1010import { Typography , useMediaQuery , useTheme } from "@mui/material" ;
11- import {
12- useApplicationTitle ,
13- useApplicationType ,
14- } from "../../hooks/application" ;
11+ import { useCurrentApplication } from "../../hooks/application" ;
1512import { ProfileButton } from "./ProfileButton" ;
1613import { ThemeToggleButton } from "./ThemeToggleButton" ;
1714import DashboardDrawer from "./DashboardDrawer" ;
@@ -42,8 +39,9 @@ export default function Dashboard({
4239 logoURL,
4340 documentationURL,
4441} : DashboardProps ) {
45- const appTitle = useApplicationTitle ( ) ;
46- const appType = useApplicationType ( ) ;
42+ const currentApp = useCurrentApplication ( ) ;
43+ const appTitle = currentApp ?. title ?? null ;
44+ const appType = currentApp ?. type ?? null ;
4745
4846 /** Theme and media query */
4947 const theme = useTheme ( ) ;
@@ -92,7 +90,6 @@ export default function Dashboard({
9290 } }
9391 >
9492 < Typography
95- color = "text.primary"
9693 variant = { isMobile ? "h6" : "h4" }
9794 fontWeight = { "bold" }
9895 width = { "fit-content" }
@@ -101,6 +98,9 @@ export default function Dashboard({
10198 whiteSpace : "nowrap" ,
10299 textOverflow : "ellipsis" ,
103100 paddingLeft : 2 ,
101+ background : `linear-gradient(90deg, ${ theme . palette . primary . main } , ${ theme . palette . secondary . main } )` ,
102+ WebkitBackgroundClip : "text" ,
103+ WebkitTextFillColor : "transparent" ,
104104 } }
105105 >
106106 { appTitle }
@@ -154,7 +154,8 @@ export default function Dashboard({
154154 flexGrow : 1 ,
155155 display : "flex" ,
156156 flexDirection : "column" ,
157- width : { sm : `${ drawerWidth } px` } ,
157+ width : { sm : `calc(100% - ${ drawerWidth } px)` } ,
158+ minWidth : 0 ,
158159 } }
159160 >
160161 < Toolbar />
0 commit comments