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

Exercise 1: adding a route, basic nav, and a button #13

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 13 additions & 1 deletion app/root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@ import {
Links,
LiveReload,
Meta,
NavLink,
Outlet,
Scripts,
ScrollRestoration,
} from '@remix-run/react'
import { GovBanner, GridContainer } from '@trussworks/react-uswds'
import { GovBanner, GridContainer, PrimaryNav } from '@trussworks/react-uswds'

import theme from './theme.css'
import favicon_16 from '~/../node_modules/@uswds/uswds/dist/img/favicons/favicon-16.png'
Expand Down Expand Up @@ -51,6 +52,17 @@ export default function App() {
<Links />
</head>
<body>
<PrimaryNav
className="margin-top-1"
items={[
<NavLink className="" to="/data" key="/data">
Data
</NavLink>,
<NavLink className="" to="/" key="/">
Home
</NavLink>,
]}
></PrimaryNav>
<a className="usa-skipnav" href="#main-content">
Skip to main content
</a>
Expand Down
14 changes: 14 additions & 0 deletions app/routes/data._index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { Link } from '@remix-run/react'

export default function () {
return (
<div>
<h1>Instrument Data</h1>
<div>
<Link to="/data/new" className="usa-button">
New Data Gathering Session
</Link>
</div>
</div>
)
}