diff --git a/frontend/pages/myPage.tsx b/frontend/pages/myPage.tsx new file mode 100644 index 00000000..020563db --- /dev/null +++ b/frontend/pages/myPage.tsx @@ -0,0 +1,18 @@ +import { wrapGetServerSidePropsWithSentry } from '@sentry/nextjs'; +import { GetServerSideProps } from 'next'; + +const MyComponent = () => { + return

Hello World!

; +}; + +export const getServerSideProps: GetServerSideProps = + wrapGetServerSidePropsWithSentry(async (context) => { + if (context.query.myParam === 'two') { + // only throw conditionally so that this page actually builds + Promise.reject(new Error("We don't like page two")); + } + + return { props: {} }; + }, '/myPage'); + +export default MyComponent;