Skip to content

Commit

Permalink
F41/404
Browse files Browse the repository at this point in the history
  • Loading branch information
iruseg00 committed Jul 31, 2019
1 parent 21a8284 commit 50a8953
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 33 deletions.
82 changes: 60 additions & 22 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 9 additions & 8 deletions app/src/App.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React from "react";
import "./App.css";
import { Router, Route } from "react-router-dom";
import { Router, Route, Switch } from "react-router-dom";
import Login from "./views/login/Login";
import Register from "./views/login/Login";
import Welcom from "./views/login/Login";
import Dashboard from "./views/dashboard/Dashboard";

import Request from "./components/request/Request";
import NotFound from './components/404/404';

import { createBrowserHistory } from "history";
import Analitic from "./helper/analitics";
Expand All @@ -26,11 +25,13 @@ class App extends React.Component {
return (
<Provider store={store}>
<Router history={history}>
<Route exact path="/" component={Welcom} />
<Route path="/login" component={Login} />
<Route path="/register" component={Register} />
<Route path="/dashboard" component={Dashboard} />
<Route component={Request} />
<Switch>
<Route exact path="/" component={Welcom} />
<Route exact path="/login" component={Login} />
<Route exact path="/register" component={Register} />
<Route path="/dashboard" component={Dashboard} />
<Route component={NotFound} />
</Switch>
</Router>
</Provider>
);
Expand Down
Binary file added app/src/assets/img/404.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions app/src/components/404/404.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React from "react";
import style from "./style.module.scss";
import { NavLink } from "react-router-dom";
import nf404 from '../../assets/img/404.png';

class NotFound extends React.Component {
render()
{
return(
<div className={style.container}>
<img src={nf404} alt="page not found" className={style.img}/>
<div className={style.text}>
Приносим свои извинения за предоставленные неудобаства, запрашиваемая вами страница не найдена или удалена.
Проверьте корректность вашего URL .
</div>
<div className={style.buttons}>
<NavLink className={style.button} onClick={this.props.history.goBack}>Назад </NavLink>
<NavLink to="/" className={style.button}>На главную</NavLink>
</div>
</div>
);
}
}

export default NotFound;
Loading

0 comments on commit 50a8953

Please sign in to comment.