Adds dataset cards to Methodology page (#442)

* intial cards for methodology page

* PR and QA feedback
- adds alert above dataset section
- adds intl
- removes nbsp
- creates directory structure for new components

* revert noUsedLocals flag

* fixed path error

* re-creates scss file to test build failure

* renaming file to troubleshoot build error

* links open in new tabs and removes console.log

* removes units on all scss value that equal 0

* resolving merge conflicts from header merge

* updates snapshots from conflict resolution
This commit is contained in:
Vim 2021-08-02 08:49:49 -07:00 committed by GitHub
commit 51f7666062
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
24 changed files with 688 additions and 36 deletions

View file

@ -11,7 +11,11 @@ import {defineMessages} from 'react-intl';
// @ts-ignore
import siteLogo from '../../src/images/icon.png';
const J40Header = () => {
interface IJ40HeaderProps {
location: Location
}
const J40Header = ({location}:IJ40HeaderProps) => {
const isMethodologyPage = location.pathname.match(/methodology\/?/);
const intl = useIntl();
const [mobileNavOpen, setMobileNavOpen] = useState(false);
const messages = defineMessages({
@ -128,6 +132,16 @@ const J40Header = () => {
</span>
<br/>
</Alert>
{!isMethodologyPage && <Alert
className={'j40-sitealert'}
type="warning">
<b>Limited data sources </b>
This tool currently includes 16 datasets. Over time, datasets could be
added, updated, or removed. The datasets come from a variety of sources
based on availability, quality, and relevance to environmental, energy,
and climate issues. Each dataset has limitations, such as how recently
the data was updated.
</Alert>}
</>
);
};