import { FunctionComponent } from 'react'; import { useNominatimQuery } from './hooks/useNominatimQuery/useNominatimQuery'; import { IMapCellProps } from './interfaces'; import { Map } from '../../../../common/components/molecules/Map/Map'; import { ErrorAlert } from '../../../../common/components/atoms/ErrorAlert/ErrorAlert'; import { Skeleton } from '@ballerine/ui'; export const MapCell: FunctionComponent = ({ value }) => { const { data, isLoading, isError } = useNominatimQuery(value); const className = 'mt-6 h-[600px] w-[600px] rounded-md'; if (isLoading) { return ; } if (isError || !data?.[0]?.lat || !data?.[0]?.lon) { return Invalid address.; } return ( ); };