File tree Expand file tree Collapse file tree 2 files changed +10
-8
lines changed
frontends/web/src/routes/settings/components Expand file tree Collapse file tree 2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 5
5
}
6
6
7
7
.backButton {
8
+ align-items : center;
8
9
background-color : transparent;
9
10
border : none;
10
11
color : var (--color-default );
11
12
display : flex;
12
- align-items : center;
13
13
font-size : var (--size-default );
14
+ height : auto;
15
+ min-width : 0 ;
14
16
padding : var (--space-quarter );
15
17
padding-left : 0 ;
16
18
text-decoration : none;
Original file line number Diff line number Diff line change 15
15
*/
16
16
17
17
import { useTranslation } from 'react-i18next' ;
18
- import { useNavigate } from 'react-router-dom' ;
19
18
import { ChevronLeftDark } from '@/components/icon' ;
19
+ import { BackButton } from '@/components/backbutton/backbutton' ;
20
20
import styles from './mobile-header.module.css' ;
21
21
22
22
type TProps = {
@@ -25,15 +25,15 @@ type TProps = {
25
25
}
26
26
27
27
export const MobileHeader = ( { title, withGuide = false } : TProps ) => {
28
- const navigate = useNavigate ( ) ;
29
28
const { t } = useTranslation ( ) ;
30
- const handleClick = ( ) => {
31
- //goes to the 'general settings' page
32
- navigate ( '/settings' ) ;
33
- } ;
29
+
34
30
return (
35
31
< div className = { `${ styles . container } ${ withGuide ? `${ styles . withGuide } ` : '' } ` } >
36
- < button onClick = { handleClick } className = { styles . backButton } > < ChevronLeftDark /> < span > { t ( 'button.back' ) } </ span > </ button >
32
+ < BackButton className = { styles . backButton } >
33
+ < ChevronLeftDark />
34
+ { ' ' }
35
+ < span > { t ( 'button.back' ) } </ span >
36
+ </ BackButton >
37
37
< h1 className = { styles . headerText } > { title } </ h1 >
38
38
</ div >
39
39
) ;
You can’t perform that action at this time.
0 commit comments