Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

fix: add back logic to hide banner #2039

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion apps/mgmt-ui/src/layout/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import AccountMenu from '@/components/AccountMenu';
import { Banner } from '@/components/Banner';
import { useActiveApplication } from '@/hooks/useActiveApplication';
import type { SupaglueProps } from '@/pages/applications/[applicationId]';
import MenuIcon from '@mui/icons-material/Menu';
import AppBar from '@mui/material/AppBar';
Expand All @@ -20,11 +21,12 @@ interface HeaderProps {

export default function Header(props: HeaderProps & SupaglueProps) {
const { onDrawerToggle, title, tabs } = props;
const { activeApplication } = useActiveApplication();

return (
<React.Fragment>
<AppBar color="primary" position="sticky" elevation={0}>
<Banner />
{activeApplication && !activeApplication.isPaid && <Banner />}
<Toolbar>
<Grid container spacing={1} alignItems="center">
<Grid sx={{ display: { sm: 'none', xs: 'block' } }} item>
Expand Down