Skip to content

Commit

Permalink
[DEV-1481]: webinar link visibility (#707)
Browse files Browse the repository at this point in the history
* feat(DEV-1481): make webinar link visibile on prod env

* chore: add changeset

* chore: make change minor

* chore: update changeset

Co-authored-by: marcobottaro <[email protected]>

---------

Co-authored-by: marcobottaro <[email protected]>
  • Loading branch information
MikeAtUqido and marcobottaro authored Mar 8, 2024
1 parent 7816dc8 commit de9bbbe
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 35 deletions.
5 changes: 5 additions & 0 deletions .changeset/eight-paws-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nextjs-website": minor
---

Make the link to the webinar list page visible in the navigation menu also in the production environment
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import DesktopUserInfo from '@/components/atoms/DesktopUserInfo/DesktopUserInfo'
import React from 'react';
import { SiteHeaderProps } from '@/components/molecules/SiteHeader/SiteHeader';
import { useTranslations } from 'next-intl';
import { isProduction } from '@/config';

const DesktopSiteHeader = ({ products }: SiteHeaderProps) => {
const t = useTranslations('devPortal');
Expand All @@ -28,17 +27,15 @@ const DesktopSiteHeader = ({ products }: SiteHeaderProps) => {
label: product.name,
}))}
/>
{!isProduction && (
<LinkMui
component={Link}
color='primary.main'
underline='none'
href={'/webinars'}
sx={{ fontSize: '16px', fontWeight: 600 }}
>
{t('siteHeader.webinars')}
</LinkMui>
)}
<LinkMui
component={Link}
color='primary.main'
underline='none'
href={'/webinars'}
sx={{ fontSize: '16px', fontWeight: 600 }}
>
{t('siteHeader.webinars')}
</LinkMui>
<DesktopUserInfo />
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { styled } from '@mui/material/styles';
import Typography from '@mui/material/Typography';
import NextLink from 'next/link';
import MobileUserInfo from '@/components/atoms/MobileUserInfo/MobileUserInfo';
import { isProduction } from '@/config';

export const MobileSiteHeaderStyledTreeItem = styled(TreeItem)(({ theme }) => ({
[`&`]: {
Expand Down Expand Up @@ -204,28 +203,27 @@ const MobileSiteHeader = ({ products }: SiteHeaderProps) => {
);
})}
</MobileSiteHeaderStyledTreeItem>
{!isProduction && (
<MobileSiteHeaderStyledTreeItem
nodeId={'siteHeader.webinars'}
label={
<Typography
component={NextLink}
variant='body1'
href={'/webinars'}
onClick={handleClick}
style={{
color: palette.primary.dark,
display: 'block',
textDecoration: 'none',
fontWeight: 600,
padding: 0,
}}
>
{t('siteHeader.webinars')}
</Typography>
}
/>
)}

<MobileSiteHeaderStyledTreeItem
nodeId={'siteHeader.webinars'}
label={
<Typography
component={NextLink}
variant='body1'
href={'/webinars'}
onClick={handleClick}
style={{
color: palette.primary.dark,
display: 'block',
textDecoration: 'none',
fontWeight: 600,
padding: 0,
}}
>
{t('siteHeader.webinars')}
</Typography>
}
/>
<Divider sx={{ marginTop: -2, marginBottom: 2 }} />
<MobileUserInfo onClick={handleClick} />
</TreeView>
Expand Down

0 comments on commit de9bbbe

Please sign in to comment.