diff --git a/apps/polyflix/public/locales/en/common.json b/apps/polyflix/public/locales/en/common.json index b45a3144..e028ad34 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": { @@ -97,4 +98,4 @@ "informations": "Activate the dark mode to preserve your eyes." } } -} +} \ 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 cda46e49..8112e4b8 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": { @@ -93,4 +94,4 @@ "informations": "Activer le mode sombre pour préserver vos yeux." } } -} +} \ 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..9e142481 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 @@ -1,5 +1,6 @@ import { ManageSearch, Person, Settings } from '@mui/icons-material' import { + Button, IconButton, List, ListItemButton, @@ -7,11 +8,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 +72,11 @@ export const DashboardNavbar: React.FC> = () => { } }, []) + const history = useHistory() + const goBack = () => { + history.goBack() + } + return ( @@ -100,6 +107,20 @@ export const DashboardNavbar: React.FC> = () => { + + {t('actions.goBack')} +