Refactor alerts (#562)

* Refactor alerts
* Remove J40Alert and classes
* Make AlertWrapper the primary component.
* Props to show one or both alerts
* Unit tests to verify one or both works correctly
* Update pages to use AlertWrapper
* Remove unused J40Aside.
* Remove dead code from index
This commit is contained in:
TomNUSDS 2021-08-25 08:34:18 -07:00 committed by GitHub
commit b32fd6ddcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 154 additions and 272 deletions

View file

@ -2,11 +2,11 @@ import * as React from 'react';
import {useIntl} from 'gatsby-plugin-intl';
import {defineMessages} from 'react-intl';
import J40Alert from '../J40Alert';
import J40Map from '../J40Map';
import * as styles from './mapWrapper.module.scss';
import * as constants from '../../data/constants';
import AlertWrapper from '../AlertWrapper';
interface IMapWrapperProps {
location: Location
@ -28,7 +28,7 @@ const MapWrapper = ({location}: IMapWrapperProps) => {
});
return (
<>
<J40Alert isPaddedLeft={true}/>
<AlertWrapper showBetaAlert={false} showLimitedDataAlert={true}/>
<J40Map location={location}/>
<div className={styles.mapCaptionTextLink}>
<a href={constants.DOWNLOAD_ZIP_URL}>