mirror of
https://github.com/DOI-DO/j40-cejst-2.git
synced 2025-08-03 05:14:18 -07:00
* Add intial search component * Add nominatum simple * Connect search field to Nominatum API - remove react-query - remove react-query logic from J40Map - move searchHandler to MapSearch * Adjust zoom and territory focus - adjust zoom buttons in CSS to allow for search field * Place search behind a feature flag * Add cors to fetch and error handling - this is to test on OMB machines * Add error messaging and bound search results to US - adjust controls to add error message to search - add MapSearchMessage component for error message - add unit tests - add state to track if API results are empty - add intl on two strings, placeholder and error message * Remove warpper around MapSearch component - reorder component import in J40Map - remove unused CSS in MapSearch.module.scss - remove and comment on wrapper error on MapSearch - rename isSearchEmpty to isSearchResultsEmpty - update snapshot * Add error message - if the search query returns null, show an error message
42 lines
975 B
TypeScript
42 lines
975 B
TypeScript
import React, {ReactNode} from 'react';
|
|
import {Helmet} from 'react-helmet';
|
|
|
|
import {URLFlagProvider} from '../contexts/FlagContext';
|
|
|
|
import J40Header from './J40Header';
|
|
import J40Footer from './J40Footer';
|
|
|
|
interface ILayoutProps {
|
|
children: ReactNode,
|
|
location: Location,
|
|
title: string,
|
|
}
|
|
|
|
const Layout = ({children, location, title}: ILayoutProps) => {
|
|
// @ts-ignore
|
|
return (
|
|
<>
|
|
<Helmet defer={false}>
|
|
<html lang="en"/>
|
|
<title>{title}</title>
|
|
|
|
{/* DAP Tag */}
|
|
<script async
|
|
type="text/javascript"
|
|
id="_fed_an_ua_tag"
|
|
src="https://dap.digitalgov.gov/Universal-Federated-Analytics-Min.js?agency=DOI&sitetopic=cejst&enhlink=true">
|
|
</script>
|
|
</Helmet>
|
|
|
|
<URLFlagProvider location={location}>
|
|
<J40Header />
|
|
<main id={'main-content'}>
|
|
{children}
|
|
</main>
|
|
<J40Footer/>
|
|
</URLFlagProvider>
|
|
</>
|
|
);
|
|
};
|
|
|
|
export default Layout;
|