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

404 page added #233

Merged
merged 4 commits into from
Nov 6, 2023
Merged

404 page added #233

merged 4 commits into from
Nov 6, 2023

Conversation

jtmst
Copy link
Contributor

@jtmst jtmst commented Nov 6, 2023

Description

Relates to #14711

  • Adds the 404 page component
  • Adds the common and popular component
  • Modifies the getGlobalElements call to allow for only headerData calls
  • Adds unit tests for 404 page

Testing done

Local visual testing

Screenshots

image image

QA steps

Navigate to any non-existant page
Verify that 404 page matches prod

Is this PR blocked by another PR?

  • Add the DO NOT MERGE label
  • Add links to additional PRs here:

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 6, 2023 15:10 Destroyed
src/pages/404.tsx Fixed Show resolved Hide resolved
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 6, 2023 15:26 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 6, 2023 16:20 Destroyed
src/pages/404.tsx Fixed Show resolved Hide resolved
src/pages/404.tsx Outdated Show resolved Hide resolved
)
}

export async function getStaticProps() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would restructure this to match [[...slug]].tsx a little closer, unless there's a specific reason that the 404 page needs handled in this way.

const { headerFooterData } = await getGlobalElements() feels a bit cleaner than the let & try catch block. slug has the whole getStaticProps function in a try catch

@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 6, 2023 17:22 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat November 6, 2023 17:35 Destroyed
@tjheffner tjheffner merged commit 2bceaf5 into main Nov 6, 2023
3 checks passed
@tjheffner tjheffner deleted the 14711-404-page branch November 6, 2023 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants