Commit fb6eed94 authored by Kim, Subin's avatar Kim, Subin
Browse files

ErrorPage 완성

parent 43e0a201
...@@ -6,19 +6,22 @@ import SchedulePage from "./pages/SchedulePage"; ...@@ -6,19 +6,22 @@ import SchedulePage from "./pages/SchedulePage";
import ScheduleEditPage from "./pages/ScheduleEditPage"; import ScheduleEditPage from "./pages/ScheduleEditPage";
import AdminPage from "./pages/AdminPage"; import AdminPage from "./pages/AdminPage";
import PrivateRoute from "./components/PrivateRoute"; import PrivateRoute from "./components/PrivateRoute";
import Err from "./pages/ErrorPage"; import ErrorPage from "./pages/ErrorPage";
function App() { function App() {
return ( return (
<Router basename={process.env.PUBLIC_URL}> <Router basename={process.env.REACT_APP_ROUTE_URL}>
<div id="box" className="mx-sm-auto"> <div id="box" className="container mx-sm-auto">
<Switch> <Switch>
<Route exact path="/" component={Err} /> <Route exact path="/" component={LoginPage} />
<Route path="/login" component={LoginPage} />
<Route path="/signup" component={SignupPage} /> <Route path="/signup" component={SignupPage} />
<Route path="/home" component={HomePage} /> <Route path="/home" component={HomePage} />
<Route path="/schedule/edit" component={ScheduleEditPage} /> <Route path="/schedule/edit" component={ScheduleEditPage} />
<Route path="/schedule" component={SchedulePage} /> <Route path="/schedule" component={SchedulePage} />
<PrivateRoute path="/admin" component={AdminPage} role="admin" /> <PrivateRoute path="/admin" component={AdminPage} role="admin" />
<Route component={ErrorPage} />
</Switch> </Switch>
</div> </div>
</Router> </Router>
......
const ErrorPage = () => { const ErrorPage = () => {
return ( return (
<div className="d-flex bg-white" id="notfound"> <div className="d-flex flex-column justify-content-center align-items-center vh-100">
<div className="notfound"> <img className="mb-5" src={process.env.PUBLIC_URL + '/ku-tiger.png'} alt="어흥이" />
<img src="./ku-tiger.png" /> <h2>Oops! Page Not Be Found</h2>
<h1>404</h1>
<h2 className="text-center">Oops! Page Not Be Found</h2>
<p>Sorry but the page you are looking for does not exist, have been removed. name changed or is temporarily unavailable</p> <p>Sorry but the page you are looking for does not exist, have been removed. name changed or is temporarily unavailable</p>
<a className="text-center" href="/login">Back to login</a> <a href="/login">Back to login</a>
</div>
</div> </div>
) )
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment