diff --git a/apps/polyflix/public/locales/en/common.json b/apps/polyflix/public/locales/en/common.json index 4e0418e8..539d15be 100644 --- a/apps/polyflix/public/locales/en/common.json +++ b/apps/polyflix/public/locales/en/common.json @@ -28,7 +28,8 @@ "delete": "delete", "closeModal": "Close modal", "report": "report", - "seeMore": "See more" + "seeMore": "See more", + "goBack": "Go back" }, "navbar": { "tooltip": { @@ -102,4 +103,4 @@ "typeHere": "Please input here..." } } -} +} \ No newline at end of file diff --git a/apps/polyflix/public/locales/fr/common.json b/apps/polyflix/public/locales/fr/common.json index 0537a3c4..c7d7ef3b 100644 --- a/apps/polyflix/public/locales/fr/common.json +++ b/apps/polyflix/public/locales/fr/common.json @@ -28,7 +28,8 @@ "delete": "supprimer", "report": "signaler", "closeModal": "Fermer la modale", - "seeMore": "Voir Plus" + "seeMore": "Voir Plus", + "goBack": "Retour" }, "navbar": { "tooltip": { @@ -98,4 +99,4 @@ "typeHere": "Veuillez saisir ici..." } } -} +} \ No newline at end of file diff --git a/apps/polyflix/src/modules/core/components/Dashboard/Navbar/Navbar.component.tsx b/apps/polyflix/src/modules/core/components/Dashboard/Navbar/Navbar.component.tsx index 5f5d6760..11a1590e 100644 --- a/apps/polyflix/src/modules/core/components/Dashboard/Navbar/Navbar.component.tsx +++ b/apps/polyflix/src/modules/core/components/Dashboard/Navbar/Navbar.component.tsx @@ -7,11 +7,12 @@ import { ListItemText, Stack, Tooltip, + Typography, useTheme, } from '@mui/material' import Box from '@mui/material/Box' import React, { PropsWithChildren, useEffect } from 'react' -import { Link as RouterLink, useLocation } from 'react-router-dom' +import { Link as RouterLink, useLocation, useHistory } from 'react-router-dom' import { Icon } from '@core/components/Icon/Icon.component' import { Logo } from '@core/components/Logo/Logo.component' @@ -70,6 +71,11 @@ export const DashboardNavbar: React.FC> = () => { } }, []) + const history = useHistory() + const goBack = () => { + history.goBack() + } + return ( @@ -100,6 +106,20 @@ export const DashboardNavbar: React.FC> = () => { + + {t('actions.goBack')} +