Skip to content

Commit

Permalink
Fix 404 page and podcast page (#1766)
Browse files Browse the repository at this point in the history
  • Loading branch information
kylemh authored Nov 9, 2023
1 parent de73d5f commit 1245699
Show file tree
Hide file tree
Showing 15 changed files with 39 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ exports[`CloseButton should render with just required props passed 1`] = `
type="button"
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Close
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`LinkButton should render with many props assigned 1`] = `
>
Test
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

exports[`ValueCard should render with required props 1`] = `
<article
className="Card !justify-start max-w-[400px] h-[400px] p-8 overflow-y-auto"
className="items-center bg-white [&_svg]:fill-secondary text-secondary flex flex-col flex-nowrap justify-around m-4 min-h-[100px] min-w-[100px] p-6 shadow-md focus-visible:outline-none !justify-start max-w-[400px] h-[400px] p-8 overflow-y-auto"
>
<h3
className="text-center underline"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`Content should render with many props assigned 1`] = `
id="testing-link"
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Scroll Link for
Expand Down
30 changes: 10 additions & 20 deletions components/ErrorDisplay/ErrorDisplay.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { useEffect } from 'react';
import { number } from 'prop-types';
import Head from 'components/head';

Expand All @@ -7,31 +6,22 @@ ErrorDisplay.propTypes = { statusCode: number };
ErrorDisplay.defaultProps = { statusCode: undefined };

function ErrorDisplay({ statusCode }) {
useEffect(() => {
document.body.style.overflowY = 'hidden';
return () => {
document.body.style.overflowY = '';
};
}, []);

return (
<>
<Head title={statusCode ? `${statusCode}` : 'Error'}>
<meta name="robots" content="noindex, nofollow" key={statusCode} />
</Head>

<div className="bg-themeGray w-full h-full">
<div
className={
'h-[45vh] md:h-full text-white bg-[url("/static/images/TankFlip.gif")] flex flex-col justify-center w-full bg-cover items-center'
}
>
<div className="text-center my-4 mx-auto">
<h1 className="text-6xl text-white">{statusCode || 'Oh no'}!</h1>
<p className="text-2xl text-white">
We&apos;re so ashamed. You definitely weren&apos;t supposed to see this...
</p>
</div>
<div
className={
'h-screen text-white bg-[url("/static/images/TankFlip.gif")] flex flex-col justify-center w-full bg-cover items-center'
}
>
<div className="text-center my-4 mx-auto">
<h1 className="text-6xl text-white">{statusCode || 'Oh no'}!</h1>
<p className="text-2xl text-white">
We&apos;re so ashamed. You definitely weren&apos;t supposed to see this...
</p>
</div>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,22 @@

exports[`ErrorDisplay should render with just required props 1`] = `
<div
className="bg-themeGray w-full h-full"
className="h-screen text-white bg-[url(\\"/static/images/TankFlip.gif\\")] flex flex-col justify-center w-full bg-cover items-center"
>
<div
className="h-[45vh] md:h-full text-white bg-[url(\\"/static/images/TankFlip.gif\\")] flex flex-col justify-center w-full bg-cover items-center"
className="text-center my-4 mx-auto"
>
<div
className="text-center my-4 mx-auto"
<h1
className="text-6xl text-white"
>
<h1
className="text-6xl text-white"
>
404
!
</h1>
<p
className="text-2xl text-white"
>
We're so ashamed. You definitely weren't supposed to see this...
</p>
</div>
404
!
</h1>
<p
className="text-2xl text-white"
>
We're so ashamed. You definitely weren't supposed to see this...
</p>
</div>
</div>
`;
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ exports[`FeaturedJobItem should render with many props assigned 1`] = `
Experienced React Engineer
</h6>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down Expand Up @@ -99,7 +99,7 @@ exports[`FeaturedJobItem should render with required props 1`] = `
DevOps Engineer
</h6>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ exports[`RegistrationForm should render with required props 1`] = `
>
Operation Code's Code of Conduct.
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Heading should render with required props 1`] = `
id="test-link"
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Scroll Link for
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ exports[`Modal should render with many props assigned 1`] = `
type="button"
>
<span
class="ScreenReaderOnly"
class="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Close
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ exports[`OutboundLink should render with required props 1`] = `
>
Test
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ exports[`JoinSection should render 1`] = `
id="join-our-thriving-community-link"
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Scroll Link for
Expand Down Expand Up @@ -61,7 +61,7 @@ exports[`JoinSection should render 1`] = `
>
Never heard of Slack before?
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ exports[`SocialMediaItem should render with required props 1`] = `
target="_blank"
>
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Operation Code's
Facebook
</span>
<svg />
<span
className="ScreenReaderOnly"
className="sr-only"
data-testid="SCREEN_READER_ONLY"
>
Opens in new window
Expand Down
2 changes: 2 additions & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ const nextConfig = {
s3hostName,
'user-images.githubusercontent.com',
'ssl-static.libsyn.com',
'static.libsyn.com',
'libsyn.com',
'i.ytimg.com',
],
},
Expand Down
2 changes: 1 addition & 1 deletion pages/podcast.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export async function getStaticProps() {
return { props: { episodes }, revalidate: ONE_DAY };
}

// Request failed or RSS Feed is broken
// Request failed or RSS Feed is broken... Break the build!
throw new Error('getStaticProps in /podcast failed.');
}

Expand Down

2 comments on commit 1245699

@vercel
Copy link

@vercel vercel bot commented on 1245699 Nov 9, 2023

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on 1245699 Nov 9, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.