From f5ac6a5be9ab3aeca6b2bae78d7736ad6e9df291 Mon Sep 17 00:00:00 2001 From: Jim Ntare Date: Thu, 24 Mar 2022 13:43:29 +0200 Subject: [PATCH] add result page --- webclient/pages/result.tsx | 50 +++++++++++++++++++++++++++++++++++++ webclient/pages/results.tsx | 5 +++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 webclient/pages/result.tsx diff --git a/webclient/pages/result.tsx b/webclient/pages/result.tsx new file mode 100644 index 0000000..95cdf14 --- /dev/null +++ b/webclient/pages/result.tsx @@ -0,0 +1,50 @@ +import { NextPage } from 'next'; +import Head from 'next/head'; +import NavBar from '../components/NavBar'; +import Scroll from '../components/Scroll'; +import { useTypedSelector } from '../hooks/useTypedSelector'; + +const Results: NextPage = () => { + const { error, loading } = useTypedSelector((state) => state.laws); + + return ( +
+ + Results + + + + + +
+ {/*

this is a result page

*/} +
+

Heading

+

fdad

+ {/* */} +
+ {/* {error &&

{error}

} + {loading &&

Loading...

} + {data.length === 0 ? ( +

No Results

+ ) : ( + data.map((item) => ( +
+ +
{item.type}
+
{item.chapter}
+
{item.article}
+
+

{item.heading}

+

{item.intro}

+ +
+ )) + )} */} +
+
+
+ ); +}; + +export default Results; diff --git a/webclient/pages/results.tsx b/webclient/pages/results.tsx index fe43702..a435c53 100644 --- a/webclient/pages/results.tsx +++ b/webclient/pages/results.tsx @@ -2,6 +2,7 @@ import { NextPage } from 'next'; import Head from 'next/head'; import NavBar from '../components/NavBar'; import Scroll from '../components/Scroll'; +import Link from 'next/link'; import { useTypedSelector } from '../hooks/useTypedSelector'; const Results: NextPage = () => { @@ -214,7 +215,9 @@ const Results: NextPage = () => {

{item.heading}

{item.intro}

- + + + )) )}