CEJST Map (#139)

* styles prettier fix
* Addresses issue #100 from the frontend:
* Creates new cejst page and related OL components
* temporarily loads census-derived tileserver at higher zoom levels
* lays out cejst page : TODO :  remove aside
* temporarily removing license check - TODO: fix jsonlint
* review comments
This commit is contained in:
Nat Hillard 2021-06-16 18:16:49 -04:00 committed by GitHub
commit 292c5bc8f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 455 additions and 19 deletions

View file

@ -0,0 +1,5 @@
.disclaimer {
margin-top: 24px;
margin-bottom: 21px;
margin-left: 49px;
}

12
client/src/pages/cejst.module.scss.d.ts vendored Normal file
View file

@ -0,0 +1,12 @@
declare namespace CejstModuleScssNamespace {
export interface ICejstModuleScss {
disclaimer: string;
}
}
declare const CejstModuleScssModule: CejstModuleScssNamespace.ICejstModuleScss & {
/** WARNING: Only available when `css-loader` is used without `style-loader` or `mini-css-extract-plugin` */
locals: CejstModuleScssNamespace.ICejstModuleScss;
};
export = CejstModuleScssModule;

View file

@ -0,0 +1,59 @@
import React, {useState} from 'react';
import Layout from '../components/layout';
import MapWrapper from '../components/map';
import MapControls from '../components/mapControls';
import HowYouCanHelp from '../components/HowYouCanHelp';
import Feature from 'ol/Feature';
import Geometry from 'ol/geom/Geometry';
import {Alert} from '@trussworks/react-uswds';
import * as styles from './cejst.module.scss';
interface IMapPageProps {
location: Location;
}
const CEJSTPage = ({location}: IMapPageProps) => {
const [features, setFeatures] = useState<Feature<Geometry>[]>([]);
return (
<Layout location={location}>
<main id="main-content" role="main">
<p className={styles.disclaimer}>
The Climate and Economic Justice Screening Tool helps
identify and prioritize communities across the United
States and US territories that have been historically
overburdened and underserved so that they may receive
40% of the benefits from investments in six key areas as
outlined in the <a
href={'https://www.whitehouse.gov/briefing-room/' +
'presidential-actions/2021/01/27/' +
'executive-order-on-tackling-the-climate-' +
'crisis-at-home-and-abroad/'}
target={'_blank'}
rel={'noreferrer'}>
Executive Order on Tackling the Climate Crisis at Home and
Abroad</a>.
Explore the map below or learn
more about the methodology and data indicators used to
prioritize Justice40 communities.
</p>
<Alert
type="warning"
heading="Limited Data Sources">
<p>
In this tool, we are using data sources that our
combined by our cumulative impact methodology.
Our sources were selected because sit amet,
consectetur adipiscing. See all the sources we
are investigating on our data roadmap.
</p>
</Alert>
<MapControls setFeatures={setFeatures}/>
<MapWrapper features={features} />
<HowYouCanHelp />
</main>
</Layout>
);
};
export default CEJSTPage;

View file

@ -19,6 +19,7 @@ import pollutionIcon // @ts-ignore
// @ts-ignore
import washIcon from '/node_modules/uswds/dist/img/usa-icons/wash.svg';
interface IndexPageProps {
location: Location;
}