Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to ensure main content area fills display height. #268

Merged
merged 1 commit into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
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
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
Loading