From acfc5708a80fb8ae193d6747c81d9f366f1ef4fa Mon Sep 17 00:00:00 2001 From: Hatton Date: Wed, 31 Jul 2024 08:28:27 -0600 Subject: [PATCH] Add page for grids, remove LanguageReport now that it's not needed --- src/components/Footer.tsx | 5 ++++ src/components/Routes.tsx | 7 ------ src/components/statistics/LanguageReport.tsx | 26 -------------------- 3 files changed, 5 insertions(+), 33 deletions(-) delete mode 100644 src/components/statistics/LanguageReport.tsx diff --git a/src/components/Footer.tsx b/src/components/Footer.tsx index 17b944ff..4ce21e74 100644 --- a/src/components/Footer.tsx +++ b/src/components/Footer.tsx @@ -192,6 +192,11 @@ export const Footer: React.FunctionComponent = () => { /> {separator} + + + + {separator} + = (props) => { return null; }} /> - { - return ; - }} - /> { diff --git a/src/components/statistics/LanguageReport.tsx b/src/components/statistics/LanguageReport.tsx deleted file mode 100644 index 0c54618b..00000000 --- a/src/components/statistics/LanguageReport.tsx +++ /dev/null @@ -1,26 +0,0 @@ -import React, { useEffect } from "react"; -import FileSaver from "file-saver"; -import { useGetCleanedAndOrderedLanguageList } from "../../connection/LibraryQueryHooks"; -import { ILanguage } from "../../model/Language"; - -export const LanguageReport: React.FunctionComponent<{}> = (props) => { - const langs = useGetCleanedAndOrderedLanguageList(); - - useEffect(() => { - if (langs && langs.length > 0) { - const langRows = langs.map( - (l: ILanguage) => - `${l.isoCode},"${l.name}","${l.englishName || ""}",${ - l.usageCount - }` - ); - const rows = ["TAG,AUTONYM,ENGLISH,BOOK COUNT", ...langRows]; - const csv = rows.join("\n"); - const blob = new Blob(["\ufeff" /* BOM */ + csv], { - type: "text/csv;charset=utf-8", - }); - FileSaver.saveAs(blob, "bloom-languages.csv"); - } - }, [langs]); - return
Building and downloading language report.
; -};