Adding a button to open a POIsearch in a browser
This commit is contained in:
1 parent
2fae581449
commit
ee000862f8
3 files changed
+21
-1
No files matched your search
@@ -11,6 +11,7 @@ import styled from '@suid/material/styles/styled';
|
||||
import Dialog from '../dialog';
|
||||
import Tree from '../tree';
|
||||
import { GpxViewer } from '../gpx';
|
||||
import { Browser } from '@capacitor/browser';
|
||||
|
||||
const Item = styled(Paper)(({ theme }) => ({
|
||||
...theme.typography.body2,
|
||||
@@ -170,7 +171,16 @@ const Infos: Component<{}> = (props) => {
|
||||
${feature.get('name') || ''}`}
|
||||
</div>
|
||||
<div>
|
||||
<IconButton>
|
||||
<IconButton
|
||||
onClick={async () => {
|
||||
await Browser.open({
|
||||
url: `https://www.qwant.com/?q=${encodeURIComponent(`${feature.get(
|
||||
'class'
|
||||
)}
|
||||
${feature.get('name') || ''}`)}&t=web`,
|
||||
});
|
||||
}}
|
||||
>
|
||||
<TravelExploreIcon />
|
||||
</IconButton>
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user