Skip to content

Commit

Permalink
Fix: Fix URL to the manual in the menu
Browse files Browse the repository at this point in the history
Don't hardcode the link to the menu instead use the new useManualURL
hook to derive the link from the GSA settings and the users locale.
  • Loading branch information
bjoernricks committed Jan 16, 2025
1 parent 100dd19 commit a330a2f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/web/components/menu/menu.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ import {useMatch} from 'react-router-dom';
import Link from 'web/components/link/link';
import useCapabilities from 'web/hooks/useCapabilities';
import useGmp from 'web/hooks/useGmp';
import useManualURL from 'web/hooks/useManualURL';
import useTranslation from 'web/hooks/useTranslation';

const Menu = () => {
const [_] = useTranslation();
const capabilities = useCapabilities();
const gmp = useGmp();
const manualURL = useManualURL();

function checkCapabilities(capabilitiesList) {
return capabilitiesList.reduce(
Expand Down Expand Up @@ -355,7 +357,7 @@ const Menu = () => {
subNav: [
{
label: _('User Manual'),
to: 'https://docs.greenbone.net/GSM-Manual/gos-22.04/en/',
to: manualURL,
isExternal: true,
},
{
Expand Down

0 comments on commit a330a2f

Please sign in to comment.