-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #22
- Loading branch information
Showing
10 changed files
with
85 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ | |
"plss", | ||
"PROJECTCATEGORYFUNDING", | ||
"sgid", | ||
"shapefile", | ||
"sitla", | ||
"srid", | ||
"tagname", | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<div class="agrc-container"> | ||
<noscript> You need to enable JavaScript to run this app. </noscript> | ||
<div id="root"></div> | ||
<script type="module" src="/src/mainSearch.tsx"></script> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import esriConfig from '@arcgis/core/config.js'; | ||
|
||
import { ErrorBoundary } from 'react-error-boundary'; | ||
import { AreaOfInterest, MapContainer } from './components'; | ||
|
||
const ErrorFallback = ({ error }: { error: Error }) => { | ||
return ( | ||
<div role="alert"> | ||
<p>Something went wrong:</p> | ||
<pre style={{ color: 'red' }}>{error.message}</pre> | ||
</div> | ||
); | ||
}; | ||
|
||
esriConfig.assetsPath = import.meta.env.MODE === 'production' ? '/wri/js/ugrc/assets' : '/js/ugrc/assets'; | ||
|
||
export default function App() { | ||
return ( | ||
<ErrorBoundary FallbackComponent={ErrorFallback}> | ||
<AreaOfInterest /> | ||
<MapContainer configuration="search" /> | ||
</ErrorBoundary> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { Button, ToggleButton } from '@ugrc/utah-design-system'; | ||
import { useRef } from 'react'; | ||
|
||
export const AreaOfInterest = () => { | ||
const areaOfInterestNode = useRef<HTMLInputElement>(null); | ||
|
||
return ( | ||
<div className="px-2"> | ||
<h2>Area of Interest</h2> | ||
<div className="flex w-fit gap-2 py-3"> | ||
<span> | ||
<ToggleButton onChange={(value) => (areaOfInterestNode.current!.value = value.toString())}> | ||
Draw a polygon | ||
</ToggleButton> | ||
</span> | ||
<span> | ||
<Button isDisabled>Upload a shapefile</Button> | ||
</span> | ||
</div> | ||
<input ref={areaOfInterestNode} id="aoiGeometry" type="text" className="hidden" /> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import '@arcgis/core/assets/esri/themes/light/main.css'; | ||
import React from 'react'; | ||
import { createRoot } from 'react-dom/client'; | ||
import App from './AppSearch'; | ||
import { MapProvider } from './components/contexts'; | ||
import './index.css'; | ||
|
||
createRoot(document.getElementById('root')!).render( | ||
<React.StrictMode> | ||
<MapProvider> | ||
<App /> | ||
</MapProvider> | ||
</React.StrictMode>, | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters