From 84a04605961931d110f5bb842310d7844a32f4d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20=C5=A0korpil?= Date: Tue, 1 Feb 2022 21:54:48 +0100 Subject: [PATCH] Added node search page --- application/next.config.js | 11 + application/src/components/Layout.tsx | 10 +- application/src/components/SortToggle.tsx | 6 +- application/src/pages/api/node.ts | 64 +++++ .../src/pages/{index.tsx => feeds.tsx} | 5 +- application/src/pages/nodes.tsx | 262 ++++++++++++++++++ application/src/pages/stats.tsx | 19 +- application/src/styles/global.scss | 8 +- application/src/types/NodeRequest.ts | 32 +++ application/src/types/NodeResponse.ts | 21 ++ application/src/types/Sort.ts | 4 + 11 files changed, 428 insertions(+), 14 deletions(-) create mode 100644 application/next.config.js create mode 100644 application/src/pages/api/node.ts rename application/src/pages/{index.tsx => feeds.tsx} (97%) create mode 100644 application/src/pages/nodes.tsx create mode 100644 application/src/types/NodeRequest.ts create mode 100644 application/src/types/NodeResponse.ts create mode 100644 application/src/types/Sort.ts diff --git a/application/next.config.js b/application/next.config.js new file mode 100644 index 0000000..c20e25f --- /dev/null +++ b/application/next.config.js @@ -0,0 +1,11 @@ +module.exports = { + async redirects() { + return [ + { + source: '/', + destination: '/feeds', + permanent: true, + }, + ] + }, +} diff --git a/application/src/components/Layout.tsx b/application/src/components/Layout.tsx index 0f3ffd1..ff8bc5a 100644 --- a/application/src/components/Layout.tsx +++ b/application/src/components/Layout.tsx @@ -35,7 +35,7 @@ const Layout: React.FC<{ matomoConfig: UserOptions, children: React.ReactNode }>