The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/client/components/message/content/Location.tsx

21 lines
511 B

import type { IMessage } from '@rocket.chat/core-typings';
import type { ReactElement } from 'react';
import React from 'react';
import MapView from './location/MapView';
type LocationProps = {
location?: IMessage['location'];
};
const Location = ({ location }: LocationProps): ReactElement | null => {
const [longitude, latitude] = location?.coordinates ?? [];
if (!latitude || !longitude) {
return null;
}
return <MapView latitude={latitude} longitude={longitude} />;
};
export default Location;