From b817641b4bc45edf93315ea972fe0969ff587aef Mon Sep 17 00:00:00 2001 From: Paul Date: Tue, 7 Dec 2021 23:30:34 -0500 Subject: [PATCH] Display resources page data --- pages/resources.tsx | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/pages/resources.tsx b/pages/resources.tsx index 9479b24..6e51272 100644 --- a/pages/resources.tsx +++ b/pages/resources.tsx @@ -1,5 +1,6 @@ import React, { ReactElement } from 'react'; import Layout from '../components/layout'; +import style from '../styles/lists.module.css'; type listItem = { children?: listItem[] | string[]; @@ -87,17 +88,17 @@ function mapChild(obj: listItem | string, level: number) { if (typeof obj === 'string') { if (obj === '') return <> - return
  • {obj}
  • + return {obj} } if (obj.title === '') return <> if (obj.url) - return
  • {obj.title}
  • + return {obj.title} if (!obj.children) - return
  • {obj.title}
  • + return {obj.title} let title: ReactElement; @@ -110,9 +111,9 @@ function mapChild(obj: listItem | string, level: number) { <> {title} {obj.description ?

    {obj.description}

    : <>} - + ); } @@ -121,7 +122,7 @@ function Resources() { return (
    - + {list.map(l => mapChild(l, 0))}
    ); }