-
Notifications
You must be signed in to change notification settings - Fork 24
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
practice bootcamp adding 404 and 500 #198
Open
krocodileteeth
wants to merge
1
commit into
ScottyLabs:main
Choose a base branch
from
krocodileteeth:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { NextPage } from "next" | ||
import React, { ReactElement } from "react" | ||
import ScottyLabsHeader from "src/components/design/ScottyLabsHeader" | ||
import WaveBackground from "src/components/design/WaveBackground" | ||
import ApplicationForm from "src/components/form/ApplicationForm" | ||
import Menu from "src/components/menu/Menu" | ||
import styles from "../styles/404.module.scss" | ||
|
||
const ApplicationPage: NextPage = (): ReactElement => { | ||
return ( | ||
<> | ||
<WaveBackground /> | ||
<Menu /> | ||
<div> | ||
<ScottyLabsHeader /> | ||
<div className={styles.background}> | ||
<ApplicationForm /> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default function Custom404() { | ||
return ( | ||
<> | ||
<WaveBackground /> | ||
<div> | ||
<ScottyLabsHeader /> | ||
<div className={styles.background}> | ||
<h1> 404 - Page Not Found </h1> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { NextPage } from "next" | ||
import React, { ReactElement } from "react" | ||
import ScottyLabsHeader from "src/components/design/ScottyLabsHeader" | ||
import WaveBackground from "src/components/design/WaveBackground" | ||
import ApplicationForm from "src/components/form/ApplicationForm" | ||
import Menu from "src/components/menu/Menu" | ||
import styles from "../styles/500.module.scss" | ||
|
||
const ApplicationPage: NextPage = (): ReactElement => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same goes for this function - it is not used so it can be removed safely |
||
return ( | ||
<> | ||
<WaveBackground /> | ||
<Menu /> | ||
<div> | ||
<ScottyLabsHeader /> | ||
<div className={styles.background}> | ||
<ApplicationForm /> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} | ||
|
||
export default function Custom404() { | ||
return ( | ||
<> | ||
<WaveBackground /> | ||
<div> | ||
<ScottyLabsHeader /> | ||
<div className={styles.background}> | ||
<h1> 500 - Server Error </h1> | ||
</div> | ||
</div> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,51 @@ | ||
import { StyledEngineProvider, ThemeProvider } from "@mui/material" | ||
import type { AppProps } from "next/app" | ||
import Head from "next/head" | ||
import { ReactElement } from "react" | ||
import { Provider } from "react-redux" | ||
import Script from "next/script" | ||
import store from "src/store" | ||
import { theme } from "src/themes/theme" | ||
import "styles/globals.scss" | ||
const App = ({ Component, pageProps }: AppProps): ReactElement => { | ||
return ( | ||
<> | ||
<Head> | ||
<title>TartanHacks</title> | ||
{/* Disable cache control */} | ||
<meta | ||
httpEquiv="Cache-Control" | ||
content="no-cache, no-store, must-revalidate" | ||
/> | ||
<meta httpEquiv="Pragma" content="no-cache" /> | ||
<meta httpEquiv="Expires" content="0" /> | ||
<meta name="description" content="Register for TartanHacks" /> | ||
<link rel="icon" href="/favicon.png" /> | ||
<Script | ||
async | ||
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.GOOGLE_ANALYTICS_ID}`} | ||
></Script> | ||
<Script id="google-analytics" strategy="afterInteractive"> | ||
{` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', '${process.env.GOOGLE_ANALYTICS_ID}', { | ||
page_path: window.location.pathname, | ||
}); | ||
`} | ||
</Script> | ||
</Head> | ||
<ThemeProvider theme={theme}> | ||
<Provider store={store}> | ||
<StyledEngineProvider injectFirst> | ||
<Component {...pageProps} /> | ||
</StyledEngineProvider> | ||
</Provider> | ||
</ThemeProvider> | ||
</> | ||
) | ||
} | ||
export default App | ||
import { StyledEngineProvider, ThemeProvider } from "@mui/material" | ||
import type { AppProps } from "next/app" | ||
import Head from "next/head" | ||
import { ReactElement } from "react" | ||
import { Provider } from "react-redux" | ||
import Script from "next/script" | ||
import store from "src/store" | ||
import { theme } from "src/themes/theme" | ||
import "styles/globals.scss" | ||
|
||
const App = ({ Component, pageProps }: AppProps): ReactElement => { | ||
return ( | ||
<> | ||
<Head> | ||
<title>TartanHacks</title> | ||
{/* Disable cache control */} | ||
<meta | ||
httpEquiv="Cache-Control" | ||
content="no-cache, no-store, must-revalidate" | ||
/> | ||
<meta httpEquiv="Pragma" content="no-cache" /> | ||
<meta httpEquiv="Expires" content="0" /> | ||
<meta name="description" content="Register for TartanHacks" /> | ||
<link rel="icon" href="/favicon.png" /> | ||
<Script | ||
async | ||
src={`https://www.googletagmanager.com/gtag/js?id=${process.env.GOOGLE_ANALYTICS_ID}`} | ||
></Script> | ||
<Script id="google-analytics" strategy="afterInteractive"> | ||
{` | ||
window.dataLayer = window.dataLayer || []; | ||
function gtag(){dataLayer.push(arguments);} | ||
gtag('js', new Date()); | ||
gtag('config', '${process.env.GOOGLE_ANALYTICS_ID}', { | ||
page_path: window.location.pathname, | ||
}); | ||
`} | ||
</Script> | ||
</Head> | ||
<ThemeProvider theme={theme}> | ||
<Provider store={store}> | ||
<StyledEngineProvider injectFirst> | ||
<Component {...pageProps} /> | ||
</StyledEngineProvider> | ||
</Provider> | ||
</ThemeProvider> | ||
</> | ||
) | ||
} | ||
|
||
export default App |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
import { Collapse, LinearProgress } from "@mui/material" | ||
import { deleteCookie } from "cookies-next" | ||
import { NextPage } from "next" | ||
import { ReactElement, useEffect } from "react" | ||
import AuthenticationDialog from "src/components/auth/AuthenticationDialog" | ||
import ScottyLabsIcon from "src/components/design/ScottyLabsIcon" | ||
import WaveHeader from "src/components/design/WaveHeader" | ||
import styles from "../styles/Auth.module.scss" | ||
const LoginPage: NextPage = (): ReactElement => { | ||
useEffect(() => { | ||
window.localStorage.removeItem("accessToken") | ||
deleteCookie("accessToken") | ||
}, []) | ||
return ( | ||
<div> | ||
<WaveHeader /> | ||
<div className={styles.scottyContainer}> | ||
<ScottyLabsIcon className={styles.scottyIcon} /> | ||
</div> | ||
<div className={styles.dialog}> | ||
<AuthenticationDialog registration={false} /> | ||
</div> | ||
</div> | ||
) | ||
} | ||
export default LoginPage | ||
import { Collapse, LinearProgress } from "@mui/material" | ||
import { deleteCookie } from "cookies-next" | ||
import { NextPage } from "next" | ||
import { ReactElement, useEffect } from "react" | ||
import AuthenticationDialog from "src/components/auth/AuthenticationDialog" | ||
import ScottyLabsIcon from "src/components/design/ScottyLabsIcon" | ||
import WaveHeader from "src/components/design/WaveHeader" | ||
import styles from "../styles/Auth.module.scss" | ||
|
||
const LoginPage: NextPage = (): ReactElement => { | ||
useEffect(() => { | ||
window.localStorage.removeItem("accessToken") | ||
deleteCookie("accessToken") | ||
}, []) | ||
return ( | ||
<div> | ||
<WaveHeader /> | ||
<div className={styles.scottyContainer}> | ||
<ScottyLabsIcon className={styles.scottyIcon} /> | ||
</div> | ||
<div className={styles.dialog}> | ||
<AuthenticationDialog registration={false} /> | ||
</div> | ||
</div> | ||
) | ||
} | ||
|
||
export default LoginPage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,4 +53,4 @@ | |
.link:hover { | ||
text-decoration: underline; | ||
filter: brightness(85%); | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function is not actually used - it can be removed