Skip to content

Commit

Permalink
Merge pull request #268 from MetroStar/layout-updates
Browse files Browse the repository at this point in the history
Update to ensure main content area fills display height.
  • Loading branch information
jbouder committed Jul 1, 2024
2 parents 0c901ad + bc6208c commit bb9ab96
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 19 deletions.
30 changes: 14 additions & 16 deletions src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,19 @@ const queryClient = new QueryClient();

export const App = (): React.ReactElement => (
<QueryClientProvider client={queryClient}>
<div>
<Header />
<main id="mainSection" className="usa-section">
<Routes>
<Route path="/signin" element={<SignIn />} />
<Route path="/" element={<Home />} />
<Route element={<ProtectedRoute />}>
<Route path="/dashboard" element={<Dashboard />} />
</Route>
<Route element={<ProtectedRoute />}>
<Route path="/details/:id" element={<Details />} />
</Route>
</Routes>
</main>
<Footer />
</div>
<Header />
<main id="mainSection" className="usa-section">
<Routes>
<Route path="/signin" element={<SignIn />} />
<Route path="/" element={<Home />} />
<Route element={<ProtectedRoute />}>
<Route path="/dashboard" element={<Dashboard />} />
</Route>
<Route element={<ProtectedRoute />}>
<Route path="/details/:id" element={<Details />} />
</Route>
</Routes>
</main>
<Footer />
</QueryClientProvider>
);
22 changes: 19 additions & 3 deletions src/styles.scss
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
@forward 'providers/uswds/uswds.scss';

.usa-section {
padding-top: 1em;
html,
body {
height: 100%;
}

#root {
height: 100%;
display: flex;
flex-direction: column;
}

#mainSection {
min-height: 500px;
display: unset;
flex: 1;
}

.usa-footer {
overflow: visible;
}

.usa-section {
padding-top: 1em;
}

.usa-form .usa-button {
Expand Down

0 comments on commit bb9ab96

Please sign in to comment.