File tree Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Expand file tree Collapse file tree 3 files changed +43
-4
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ import { light } from "./theme"
7
7
import { BrowserRouter as Router , Route , Routes } from "react-router-dom"
8
8
9
9
import CliAuthenticationPage from "./pages/cli-auth"
10
+ import NotFoundPage from "./pages/404"
10
11
import IndexPage from "./pages/index"
11
12
import LoginPage from "./pages/login"
12
13
import ProjectsPage from "./pages/projects"
@@ -57,7 +58,7 @@ export const App: React.FC = () => {
57
58
{ /* Using path="*"" means "match anything", so this route
58
59
acts like a catch-all for URLs that we don't have explicit
59
60
routes for. */ }
60
- < Route path = "*" element = { < div > 404 </ div > } />
61
+ < Route path = "*" element = { < NotFoundPage / >} />
61
62
</ Route >
62
63
</ Routes >
63
64
</ ThemeProvider >
Original file line number Diff line number Diff line change
1
+ import { makeStyles } from "@material-ui/core/styles"
2
+ import React , { useEffect , useState } from "react"
3
+ import { getApiKey } from "../api"
4
+ import { CliAuthToken } from "../components/SignIn"
5
+
6
+ import { FullScreenLoader } from "../components/Loader/FullScreenLoader"
7
+ import { useUser } from "../contexts/UserContext"
8
+ import { Typography } from "@material-ui/core"
9
+
10
+ const CliAuthenticationPage : React . FC = ( ) => {
11
+ const { me } = useUser ( true )
12
+ const styles = useStyles ( )
13
+
14
+ return (
15
+ < div className = { styles . root } >
16
+ < div className = { styles . headingContainer } >
17
+ < Typography variant = "h4" > 404</ Typography >
18
+ </ div >
19
+ < Typography variant = "body2" > This page could not be found.</ Typography >
20
+ </ div >
21
+ )
22
+ }
23
+
24
+ const useStyles = makeStyles ( ( theme ) => ( {
25
+ root : {
26
+ width : "100vw" ,
27
+ height : "100vh" ,
28
+ display : "flex" ,
29
+ flexDirection : "row" ,
30
+ justifyContent : "center" ,
31
+ alignItems : "center" ,
32
+ } ,
33
+ headingContainer : {
34
+ margin : theme . spacing ( 1 ) ,
35
+ padding : theme . spacing ( 1 ) ,
36
+ borderRight : theme . palette . divider ,
37
+ } ,
38
+ } ) )
39
+
40
+ export default CliAuthenticationPage
Original file line number Diff line number Diff line change @@ -20,9 +20,7 @@ const config: webpack.Configuration = {
20
20
headers : {
21
21
"Access-Control-Allow-Origin" : "*" ,
22
22
} ,
23
- historyApiFallback : {
24
- index : "html_templates/index.html" ,
25
- } ,
23
+ historyApiFallback : true ,
26
24
hot : true ,
27
25
proxy : {
28
26
"/api" : "http://localhost:3000" ,
You can’t perform that action at this time.
0 commit comments