-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Clean-up - require log in to view the form manager. * Remove "build-image-kansas" deploy job
- Loading branch information
1 parent
05f4b6d
commit 7a208f7
Showing
2 changed files
with
18 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,26 @@ | ||
--- | ||
import AppFormManager from '../components/AppFormManager'; | ||
import { getServerContext } from '../config/astro.js'; | ||
import { getServerContext, getUserSession } from '../config/astro.js'; | ||
import Layout from '../layouts/Layout.astro'; | ||
import * as routes from '../routes.js'; | ||
const { baseUrl, uswdsRoot } = await getServerContext(Astro); | ||
const loggedIn = !!(await getUserSession(Astro)).session; | ||
--- | ||
|
||
<Layout title="10x Access to Justice"> | ||
<AppFormManager client:only="react" ctx={{ baseUrl, uswdsRoot }} /> | ||
{ | ||
loggedIn ? ( | ||
<AppFormManager client:only="react" ctx={{ baseUrl, uswdsRoot }} /> | ||
) : ( | ||
<div class="grid-container"> | ||
<h1>10x Forms Platform</h1> | ||
<p class="usa-prose">Welcome to the 10x Forms Platform web server.</p> | ||
<p class="usa-prose"> | ||
Authorized users may <a href={routes.getLoginUrl(baseUrl)}>sign in</a>{' '} | ||
to test the Forms Platform. | ||
</p> | ||
</div> | ||
) | ||
} | ||
</Layout> |