Skip to content

Commit

Permalink
fix(navbar): correct navigation bar issue on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
matiasbenary committed Nov 27, 2024
1 parent 02908a3 commit 51b3959
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ const StyledCard = ({ href, title, description }: { href: string; title: string;
);
};

const NewsletterBanner = styled.div<{ isSidebarExpanded: boolean }>`
const NewsletterBanner = styled.div<{ isSidebarExpanded: boolean,deviceType:string }>`
background-color: #0072ce;
color: white;
padding: 8px;
text-align: center;
font-size: 14px;
position: absolute;
top: 0;
left: ${(p) => (p.isSidebarExpanded ? 'var(--sidebar-width-expanded)' : 'var(--sidebar-width-collapsed)')};
left: ${(p) => p.deviceType === 'mobile' ? 0:(p.isSidebarExpanded ? 'var(--sidebar-width-expanded)' : 'var(--sidebar-width-collapsed)')};
transition: all var(--sidebar-expand-transition-speed);
right: 0;
Expand Down Expand Up @@ -117,7 +117,7 @@ const HomePage: NextPageWithLayout = () => {
return (
<Section grow="available">
{visible && (
<NewsletterBanner isSidebarExpanded={isSidebarExpanded}>
<NewsletterBanner isSidebarExpanded={isSidebarExpanded} deviceType={deviceType}>
Stay updated!{' '}
<a
href="https://bit.ly/devhubnews"
Expand Down

0 comments on commit 51b3959

Please sign in to comment.