Skip to content

Commit

Permalink
refactor(default-extent): use placement hook
Browse files Browse the repository at this point in the history
  • Loading branch information
steveoh authored and stdavis committed Jan 25, 2021
1 parent 60860a9 commit a9f6119
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ClientApp/src/components/DefaultExtent/DefaultExtent.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { faGlobeAmericas } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React from 'react';
import * as React from 'react';
import useViewUiPosition from '../../useViewUiPosition';

const goHome = (view, extent) => {
console.log('zooming to default extent');
Expand All @@ -9,8 +10,11 @@ const goHome = (view, extent) => {
};

export default function DefaultExtent(props) {
const me = useViewUiPosition(props.view, props.position);

return (
<div
ref={me}
className="esri-home esri-widget--button esri-widget"
role="button"
aria-label="Default map view"
Expand Down

0 comments on commit a9f6119

Please sign in to comment.