File tree 2 files changed +26
-12
lines changed
services/web-ui/src/features
settings/pages/AppearancePage
2 files changed +26
-12
lines changed Original file line number Diff line number Diff line change 1
- import React , { ReactNode } from "react" ;
1
+ import { ReactElement , ReactNode } from "react" ;
2
2
import { Link as ReactRouterLink } from "react-router-dom" ;
3
3
4
- import { ArrowBackIosNew } from "@mui/icons-material" ;
4
+ import { ArrowBack } from "@mui/icons-material" ;
5
5
import { Box , IconButton } from "@mui/material" ;
6
6
7
7
import { Nav } from "src/components/nav" ;
@@ -10,18 +10,16 @@ interface ChatPageNavProps {
10
10
children : ReactNode ;
11
11
}
12
12
13
- export function ChatPageNav ( {
14
- children,
15
- } : ChatPageNavProps ) : React . ReactElement {
13
+ export function ChatPageNav ( { children } : ChatPageNavProps ) : ReactElement {
16
14
const appBarContent = (
17
15
< IconButton
18
16
component = { ReactRouterLink }
19
17
sx = { {
20
- pr : 2 ,
18
+ mr : 2 ,
21
19
} }
22
20
to = "/chat"
23
21
>
24
- < ArrowBackIosNew sx = { { paddingRight : 1 / 2 } } />
22
+ < ArrowBack />
25
23
</ IconButton >
26
24
) ;
27
25
Original file line number Diff line number Diff line change 1
1
import { ReactElement , ReactNode } from "react" ;
2
+ import { Link as ReactRouterLink } from "react-router-dom" ;
3
+
4
+ import { ArrowBack } from "@mui/icons-material" ;
5
+ import { Box , IconButton , Typography } from "@mui/material" ;
2
6
3
- import { NavLayout } from "src/components/layout" ;
4
7
import { Nav } from "src/components/nav" ;
5
8
import { useTranslation } from "src/core/i18n" ;
6
9
@@ -13,11 +16,24 @@ export function AppearancePageNav({
13
16
} : AppearancePageNavProps ) : ReactElement {
14
17
const { t } = useTranslation ( "settings" ) ;
15
18
19
+ const appBarContent = (
20
+ < >
21
+ < IconButton
22
+ component = { ReactRouterLink }
23
+ sx = { {
24
+ mr : 2 ,
25
+ } }
26
+ to = "/profile"
27
+ >
28
+ < ArrowBack />
29
+ </ IconButton >
30
+
31
+ < Typography variant = "h5" > { t ( "header" ) } </ Typography >
32
+ </ >
33
+ ) ;
16
34
return (
17
- < Nav >
18
- < NavLayout header = { t ( "header" ) } linkText = "Back" to = "/profile" >
19
- { children }
20
- </ NavLayout >
35
+ < Nav appBarContent = { appBarContent } >
36
+ < Box sx = { { pt : 1 , px : 3 } } > { children } </ Box >
21
37
</ Nav >
22
38
) ;
23
39
}
You can’t perform that action at this time.
0 commit comments