Skip to content

Commit

Permalink
Keep the footer on the bottom (#5930)
Browse files Browse the repository at this point in the history
Had to wrap the `TopBanner` component with a div since it was conditionally rendered and a uniform value was required for `gridTemplateRows` property
  • Loading branch information
HelNershingThapa committed Jul 12, 2023
1 parent a6d6d32 commit 37248dd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/banner/topBanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function TopBanner() {
const [, error, data] = useFetchWithAbort(`system/banner/`);

return (
<>
<div>
{location.pathname === '/' && data.visible && !error && (
<div className="ph3 b--grey-light bb bg-tan top-banner-container">
<div
Expand All @@ -18,6 +18,6 @@ export function TopBanner() {
/>
</div>
)}
</>
</div>
);
}
5 changes: 4 additions & 1 deletion frontend/src/views/root.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ import { Footer } from '../components/footer';
// Components common to all routes can be included in <App>
export function Root() {
return (
<div className="flex flex-column">
<div
className="min-vh-100-l"
style={{ display: 'grid', gridTemplateRows: 'auto auto 1fr auto' }}
>
<TopBanner />
<Header />
<QueryParamProvider adapter={ReactRouter6Adapter}>
Expand Down

0 comments on commit 37248dd

Please sign in to comment.