Skip to content

Commit 28d6846

Browse files
committed
frontend: remove "Back" text from back button in mobile header
We removed it as it's not necessarry to have the text especially since it overlaps with other components in certain ocassions.
1 parent b866842 commit 28d6846

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

frontends/web/src/routes/settings/components/mobile-header.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
* limitations under the License.
1515
*/
1616

17-
import { useTranslation } from 'react-i18next';
17+
import { useNavigate } from 'react-router-dom';
1818
import { ChevronLeftDark } from '@/components/icon';
19-
import { BackButton } from '@/components/backbutton/backbutton';
2019
import styles from './mobile-header.module.css';
2120

2221
type TProps = {
@@ -25,15 +24,14 @@ type TProps = {
2524
}
2625

2726
export const MobileHeader = ({ title, withGuide = false }: TProps) => {
28-
const { t } = useTranslation();
29-
27+
const navigate = useNavigate();
28+
const handleClick = () => {
29+
//goes to the 'general settings' page
30+
navigate('/settings');
31+
};
3032
return (
3133
<div className={`${styles.container} ${withGuide ? `${styles.withGuide}` : ''}`}>
32-
<BackButton className={styles.backButton}>
33-
<ChevronLeftDark />
34-
{' '}
35-
<span>{t('button.back')}</span>
36-
</BackButton>
34+
<button onClick={handleClick} className={styles.backButton}><ChevronLeftDark /></button>
3735
<h1 className={styles.headerText}>{title}</h1>
3836
</div>
3937
);

0 commit comments

Comments
 (0)