diff --git a/examples/openspending/components/Header.tsx b/examples/openspending/components/Header.tsx index c1a47d5c..450ac078 100644 --- a/examples/openspending/components/Header.tsx +++ b/examples/openspending/components/Header.tsx @@ -53,18 +53,10 @@ export function Header() { title: 'Resources', href: '/resources', children: [ - { - title: 'IATI', - href: '/resources/iati', - }, { title: 'Follow the money', href: '/resources/journo', }, - { - title: 'OpenSpending.Mobi', - href: '/resources/mobi/', - }, { title: 'Map of Spending Projects', href: '/resources/map-of-spending-projects/', @@ -125,7 +117,6 @@ function classNames(...classes) { function Dropdown({ navItem }: { navItem: any }) { const [showDropDown, setShowDropDown] = useState(false); - console.log(showDropDown); return ( {({ open }) => ( diff --git a/examples/openspending/pages/blog/index.tsx b/examples/openspending/pages/blog/index.tsx deleted file mode 100644 index db337eea..00000000 --- a/examples/openspending/pages/blog/index.tsx +++ /dev/null @@ -1,57 +0,0 @@ -import fs from 'fs'; -import React from 'react'; -import { GetStaticProps, GetStaticPropsResult } from 'next'; - -import { BlogsList, SimpleLayout } from '@flowershow/core'; -import clientPromise from '../../lib/mddb'; -import computeFields from '../../lib/computeFields'; -import type { CustomAppProps } from '../_app'; -import Layout from '@/components/_shared/Layout'; - -interface BlogIndexPageProps extends CustomAppProps { - blogs: any[]; // TODO types -} - -export default function Blog({ - blogs, - meta: { title, description }, -}: BlogIndexPageProps) { - return ( - -
- - - -
-
- ); -} - -export const getStaticProps: GetStaticProps = async () => { - const mddb = await clientPromise; - const blogFiles = await mddb.getFiles({ folder: 'blog' }); - - const blogs = blogFiles.map((item) => ({ - _id: item._id, - file_path: item.file_path, - urlPath: item.url_path, - date: item.url_path.split('/').slice(-1)[0].split('-').slice(0,3).join('-'), - ...item.metadata - })); - - console.log(blogs[0].date) - - return { - props: { - meta: { - title: 'Blog posts', - showSidebar: false, - showToc: false, - showComments: false, - showEditLink: false, - urlPath: '/blog', - }, - blogs, - }, - }; -};