diff options
author | Antoine A <> | 2024-03-13 18:58:36 +0100 |
---|---|---|
committer | Antoine A <> | 2024-03-13 21:19:30 +0100 |
commit | cb67be6fc78bc573b91978c909322ad666e3d117 (patch) | |
tree | dc4d143487914a347eb437678485714b2efeb7da /frontend/src/routes | |
parent | 651217a5c089bd20d94f9b4760e13f491bc26861 (diff) | |
download | libeufin-cb67be6fc78bc573b91978c909322ad666e3d117.tar.gz libeufin-cb67be6fc78bc573b91978c909322ad666e3d117.tar.bz2 libeufin-cb67be6fc78bc573b91978c909322ad666e3d117.zip |
Remove unused filesdev/antoine/ebics-status
Diffstat (limited to 'frontend/src/routes')
-rw-r--r-- | frontend/src/routes/AuthenticatedRoute.tsx | 66 | ||||
-rw-r--r-- | frontend/src/routes/Layout.less | 19 | ||||
-rw-r--r-- | frontend/src/routes/Pages.tsx | 47 | ||||
-rw-r--r-- | frontend/src/routes/UnauthenticatedRoute.tsx | 59 |
4 files changed, 0 insertions, 191 deletions
diff --git a/frontend/src/routes/AuthenticatedRoute.tsx b/frontend/src/routes/AuthenticatedRoute.tsx deleted file mode 100644 index b53f9850..00000000 --- a/frontend/src/routes/AuthenticatedRoute.tsx +++ /dev/null @@ -1,66 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2020 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -/* eslint-disable @typescript-eslint/no-explicit-any */ -import * as React from 'react'; -import { connect } from 'react-redux'; -import { Route } from 'react-router-dom'; -import history from '../history'; -import { Store } from '../types'; - -import './Layout.less'; -import NavBar from '../components/navbar/Index'; -import Footer from '../components/footer/Index'; - -interface Props { - exact?: boolean; - isAuthenticated: boolean | null; - path: string; - component: React.ComponentType<any>; -} - -const AuthenticatedRoute = ({ - component: Component, - isAuthenticated, - ...otherProps -}: Props) => { - if (isAuthenticated === false) { - history.push('/login'); - } - - return ( - <> - <div className="container"> - <NavBar /> - <Route - render={() => ( - <> - <Component {...otherProps} /> - </> - )} - /> - </div> - <Footer /> - </> - ); -}; - -const mapStateToProps = (state: Store) => ({ - ...state, - isAuthenticated: state.isAuthenticated, -}); - -export default connect(mapStateToProps)(AuthenticatedRoute); diff --git a/frontend/src/routes/Layout.less b/frontend/src/routes/Layout.less deleted file mode 100644 index 2e011f26..00000000 --- a/frontend/src/routes/Layout.less +++ /dev/null @@ -1,19 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2020 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -.container { - padding: 30px 60px 64px 60px; -} diff --git a/frontend/src/routes/Pages.tsx b/frontend/src/routes/Pages.tsx deleted file mode 100644 index 9d92f065..00000000 --- a/frontend/src/routes/Pages.tsx +++ /dev/null @@ -1,47 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2020 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -import * as React from 'react'; -import { Route, Switch } from 'react-router-dom'; - -import Login from '../components/login/Index'; -import NotFound from '../components/NotFound'; -import Home from '../components/home/Index'; -import Activity from '../components/activity/Index'; -import BankAccounts from '../components/bank-accounts/Index'; - -import AuthenticatedRoute from './AuthenticatedRoute'; -import UnauthenticatedRoute from './UnauthenticatedRoute'; - -const Pages = () => { - return ( - <Switch> - <UnauthenticatedRoute path="/" exact component={Login} /> - <UnauthenticatedRoute path="/login" exact component={Login} /> - <AuthenticatedRoute path="/" exact component={Home} /> - <AuthenticatedRoute path="/home" exact component={Home} /> - <AuthenticatedRoute path="/activity" exact component={Activity} /> - <AuthenticatedRoute - path="/bank-accounts" - exact - component={BankAccounts} - /> - <Route component={NotFound} /> - </Switch> - ); -}; - -export default Pages; diff --git a/frontend/src/routes/UnauthenticatedRoute.tsx b/frontend/src/routes/UnauthenticatedRoute.tsx deleted file mode 100644 index cc1b468f..00000000 --- a/frontend/src/routes/UnauthenticatedRoute.tsx +++ /dev/null @@ -1,59 +0,0 @@ -/* - This file is part of GNU Taler - (C) 2020 Taler Systems S.A. - - GNU Taler is free software; you can redistribute it and/or modify it under the - terms of the GNU General Public License as published by the Free Software - Foundation; either version 3, or (at your option) any later version. - - GNU Taler is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along with - GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/> - */ - -/* eslint-disable @typescript-eslint/no-explicit-any */ -import * as React from 'react'; -import { connect } from 'react-redux'; -import { Route } from 'react-router-dom'; - -import history from '../history'; -import { Store } from '../types'; - -interface Props { - exact?: boolean; - isAuthenticated: boolean | null; - path: string; - component: React.ComponentType<any>; -} - -const UnauthenticatedRoute = ({ - component: Component, - isAuthenticated, - ...otherProps -}: Props) => { - if (isAuthenticated === true) { - history.push('/home'); - } - - return ( - <> - <Route - render={() => ( - <> - <Component {...otherProps} /> - </> - )} - /> - </> - ); -}; - -const mapStateToProps = (state: Store) => ({ - ...state, - isAuthenticated: state.isAuthenticated, -}); - -export default connect(mapStateToProps)(UnauthenticatedRoute); |