Skip to content

Commit

Permalink
feat: hide login button in StaticLayout component
Browse files Browse the repository at this point in the history
  • Loading branch information
BCerki committed Mar 10, 2022
1 parent 9e72b0c commit 4941580
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions app/components/Layout/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ interface Props {
children?: React.ReactNode;
title?: string;
userProfileComponent?: React.ReactNode;
hideLoginButton?: boolean;
}

const DEFAULT_MOBILE_BREAK_POINT = "900";
Expand All @@ -20,12 +21,15 @@ const Navigation: React.FC<Props> = ({
isLoggedIn = false,
title = "CleanBC Industry Fund",
userProfileComponent,
hideLoginButton,
}) => {
let rightSide = isLoggedIn ? (
<>
{userProfileComponent}
<LogoutForm />
</>
) : hideLoginButton ? (
<></>
) : (
<LoginForm />
);
Expand Down
2 changes: 1 addition & 1 deletion app/components/Layout/StaticLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface Props {
const StaticLayout: React.FC<Props> = ({ children, title }) => {
return (
<div id="page-wrap">
<Navigation title={title}>
<Navigation title={title} hideLoginButton={true}>
{runtimeConfig.SITEWIDE_NOTICE && (
<SiteNoticeBanner content={runtimeConfig.SITEWIDE_NOTICE} />
)}
Expand Down

0 comments on commit 4941580

Please sign in to comment.