diff --git a/components/ReportLoadingShade/ReportLoadingShade.tsx b/components/ReportLoadingShade/ReportLoadingShade.tsx index 059a476..6e9aa14 100644 --- a/components/ReportLoadingShade/ReportLoadingShade.tsx +++ b/components/ReportLoadingShade/ReportLoadingShade.tsx @@ -3,6 +3,10 @@ import { usePathname } from "next/navigation" import React, { useEffect, useState } from "react" import Spinner from "components/Spinner" +const DOWNLOAD_PATH_NAMES = [ + "/data" +] + export const ReportLoadingShade: React.FC<{ forceLoading?: boolean }> = ({ forceLoading }) => { const pathname = usePathname() const [isLoading, setIsLoading] = useState(false) @@ -10,7 +14,9 @@ export const ReportLoadingShade: React.FC<{ forceLoading?: boolean }> = ({ force useEffect(() => setIsLoading(false), [pathname]) useEffect(() => { - window.addEventListener("beforeunload", (_) => { + window.addEventListener("beforeunload", (e: any) => { + const destination = e.target.location.pathname + if (DOWNLOAD_PATH_NAMES.includes(destination)) return setIsLoading(true) }) }, []) diff --git a/public/content/page/data.mdx b/public/content/page/data.mdx index 0e3ad57..8c52d88 100644 --- a/public/content/page/data.mdx +++ b/public/content/page/data.mdx @@ -8,6 +8,15 @@ sections: this project. + Download: + + + [CSV Data Download](/data/grocery-gap-atlas-data-august-2024.csv.zip) + + + [XLS Data Download](/data/grocery-gap-atlas-data-august-2024.xlsx) + + | Data | Source | Year | diff --git a/public/data/grocery-gap-atlas-data-august-2024.csv.zip b/public/data/grocery-gap-atlas-data-august-2024.csv.zip new file mode 100644 index 0000000..30f6611 Binary files /dev/null and b/public/data/grocery-gap-atlas-data-august-2024.csv.zip differ diff --git a/public/data/grocery-gap-atlas-data-august-2024.xlsx b/public/data/grocery-gap-atlas-data-august-2024.xlsx new file mode 100644 index 0000000..e5f0c05 Binary files /dev/null and b/public/data/grocery-gap-atlas-data-august-2024.xlsx differ