Skip to content

Commit

Permalink
Merge pull request #18 from NYPL/feature/DR-2574/page-template
Browse files Browse the repository at this point in the history
DR-2574 Template for homepage
  • Loading branch information
7emansell authored Oct 27, 2023
2 parents 431c120 + 8ad6ebe commit 0ca6f2e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
File renamed without changes.
10 changes: 10 additions & 0 deletions __tests__/homepage.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,14 @@ describe("Home", () => {
});
expect(header).toBeInTheDocument();
});

it("renders the expected text content", () => {
const { getByText } = render(<Home />);
expect(getByText("Notification banner")).toBeInTheDocument();
expect(getByText("Header")).toBeInTheDocument();
expect(getByText("First swim lane")).toBeInTheDocument();
expect(getByText("Featured Content")).toBeInTheDocument();
expect(getByText("Rest of swim lanes")).toBeInTheDocument();
expect(getByText("Explore further links")).toBeInTheDocument();
});
});
21 changes: 20 additions & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
import CampaignHero from "../components/hero/campaignHero";
import {
SkipNavigation,
TemplateAppContainer,
} from "@nypl/design-system-react-components";

export default function Home() {
return <CampaignHero />;
return (
<TemplateAppContainer
aboveHeader={<p> Notification banner </p>}
header={<p> Header </p>}
breakout={<CampaignHero />}
contentPrimary={
<>
<p>First swim lane</p>
<p>Featured Content</p>
<p>Rest of swim lanes</p>
<p>Explore further links</p>
</>
}
renderSkipNavigation={true}
/>
);
}

0 comments on commit 0ca6f2e

Please sign in to comment.