gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant-backoffice] 05/08: refactoring route


From: gnunet
Subject: [taler-merchant-backoffice] 05/08: refactoring route
Date: Thu, 18 Feb 2021 20:07:17 +0100

This is an automated email from the git hooks/post-receive script.

sebasjm pushed a commit to branch master
in repository merchant-backoffice.

commit f688008107b76d7809d56d1598aeb3355c1d13ac
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Thu Feb 18 09:46:01 2021 -0300

    refactoring route
---
 TODO                       |  2 +-
 src/declaration.d.ts       |  2 --
 src/index.ts               | 29 -----------------------------
 src/{routes => }/index.tsx | 37 ++++++++++++++++++++-----------------
 4 files changed, 21 insertions(+), 49 deletions(-)

diff --git a/TODO b/TODO
index 4f0d9a3..19e6ce7 100644
--- a/TODO
+++ b/TODO
@@ -23,7 +23,7 @@ Already done:
  
 Next to do: 
  * implement proper error handling
- * PATCH payto uri not working as expeced
+ * PATCH payto uri not working as expeced: re-enable, creating with multiple 
uris
 
 Queue:
  * replace Yup and type definition with a taler-library for the purpose (first 
wait Florian to refactor wallet core)
diff --git a/src/declaration.d.ts b/src/declaration.d.ts
index 59523f4..bec1bd0 100644
--- a/src/declaration.d.ts
+++ b/src/declaration.d.ts
@@ -19,8 +19,6 @@
  * @author Sebastian Javier Marchano (sebasjm)
  */
 
-import { number } from "yup/lib/locale";
-
 declare module "*.css" {
     const mapping: Record<string, string>;
     export default mapping;
diff --git a/src/index.ts b/src/index.ts
deleted file mode 100644
index ba2bcac..0000000
--- a/src/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- This file is part of GNU Taler
- (C) 2021 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/>
- */
-
- /**
- *
- * @author Sebastian Javier Marchano (sebasjm)
- */
-
-import "./scss/main.scss"
-
-// Automatic code splitting only supports default exports, not named exports:
-// https://github.com/preactjs/preact-cli#route-based-code-splitting
-
-import PageRouter from './routes/index';
-
-export default PageRouter;
diff --git a/src/routes/index.tsx b/src/index.tsx
similarity index 68%
rename from src/routes/index.tsx
rename to src/index.tsx
index 1919888..8d7e3ab 100644
--- a/src/routes/index.tsx
+++ b/src/index.tsx
@@ -14,26 +14,29 @@
  GNU Taler; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
  */
 
-/**
-*
-* @author Sebastian Javier Marchano (sebasjm)
-*/
+ /**
+ *
+ * @author Sebastian Javier Marchano (sebasjm)
+ */
+
+import "./scss/main.scss"
 
 import { h, VNode } from 'preact';
 import { Route, Router } from 'preact-router';
 import { IntlProvider } from 'preact-i18n';
-import { Footer } from '../components/footer';
-import { Sidebar } from '../components/sidebar';
-import NotFoundPage from './notfound';
-import Instances from './instances';
-import { NavigationBar } from '../components/navbar';
-import { Notifications } from '../components/notifications';
-import { useNotifications } from '../hooks/notifications';
-import { translations } from '../i18n';
-import { useLang } from '../components/hooks';
-
-
-export default function PageRouter(): VNode {
+
+import { Footer } from './components/footer';
+import { Sidebar } from './components/sidebar';
+import { NavigationBar } from './components/navbar';
+import { Notifications } from './components/notifications';
+import { useNotifications } from './hooks/notifications';
+import { translations } from './i18n';
+import { useLang } from './components/hooks';
+
+import NotFoundPage from './routes/notfound';
+import Instances from './routes/instances';
+
+export default function App(): VNode {
   const { notifications, pushNotification } = useNotifications()
   const [lang, setLang] = useLang()
   return (
@@ -44,7 +47,7 @@ export default function PageRouter(): VNode {
         <Notifications notifications={notifications} />
         <Router>
           <Route path="/" component={Instances} 
pushNotification={pushNotification} />
-          <NotFoundPage />
+          <Route default component={NotFoundPage} />
         </Router>
         <Footer />
       </div>

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]