Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -14,14 +14,14 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import React, { useEffect, useState } from 'react';
import { BeaconLocationState } from 'matrix-js-sdk/src/content-helpers';
import React, { useEffect, useState } from "react";
import { BeaconLocationState } from "matrix-js-sdk/src/content-helpers";
import { Icon as ExternalLinkIcon } from '../../../../res/img/external-link.svg';
import { _t } from '../../../languageHandler';
import { makeMapSiteLink, parseGeoUri } from '../../../utils/location';
import CopyableText from '../elements/CopyableText';
import TooltipTarget from '../elements/TooltipTarget';
import { Icon as ExternalLinkIcon } from "../../../../res/img/external-link.svg";
import { _t } from "../../../languageHandler";
import { makeMapSiteLink, parseGeoUri } from "../../../utils/location";
import CopyableText from "../elements/CopyableText";
import TooltipTarget from "../elements/TooltipTarget";
interface Props {
latestLocationState?: BeaconLocationState;
@ -44,23 +44,16 @@ const ShareLatestLocation: React.FC<Props> = ({ latestLocationState }) => {
const latLonString = `${coords.latitude},${coords.longitude}`;
const mapLink = makeMapSiteLink(coords);
return <>
<TooltipTarget label={_t('Open in OpenStreetMap')}>
<a
data-testid='open-location-in-osm'
href={mapLink}
target='_blank'
rel='noreferrer noopener'
>
<ExternalLinkIcon className='mx_ShareLatestLocation_icon' />
</a>
</TooltipTarget>
<CopyableText
className='mx_ShareLatestLocation_copy'
border={false}
getTextToCopy={() => latLonString}
/>
</>;
return (
<>
<TooltipTarget label={_t("Open in OpenStreetMap")}>
<a data-testid="open-location-in-osm" href={mapLink} target="_blank" rel="noreferrer noopener">
<ExternalLinkIcon className="mx_ShareLatestLocation_icon" />
</a>
</TooltipTarget>
<CopyableText className="mx_ShareLatestLocation_copy" border={false} getTextToCopy={() => latLonString} />
</>
);
};
export default ShareLatestLocation;