Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Delint
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy committed Jul 29, 2022
1 parent 1af0476 commit 394c261
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 26 deletions.
5 changes: 0 additions & 5 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,7 @@ declare global {
}

interface HTMLDialogElement {
readonly open: boolean;
returnValue?: string;
oncancel?(ev: Event);
show(): void;
showModal(): void;
close(returnValue?: string): void;
}

// Add Chrome-specific `instant` ScrollBehaviour
Expand Down
42 changes: 21 additions & 21 deletions src/components/views/beacon/BeaconViewDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import React, { useState, useEffect } from 'react';
import React, { useState, useEffect, useContext } from 'react';
import {
Beacon,
Room,
Expand Down Expand Up @@ -136,7 +136,8 @@ const BeaconViewDialog: React.FC<IProps> = ({
id='mx_BeaconViewDialog'
bounds={bounds}
centerGeoUri={centerGeoUri}
interactiveonError={setMapDisplayError}
interactive
onError={setMapDisplayError}
className="mx_BeaconViewDialog_map"
>
{
Expand All @@ -152,26 +153,25 @@ const BeaconViewDialog: React.FC<IProps> = ({
</>
}
</Map> }
{ mapDisplayError &&
<MapError
error={mapDisplayError.message as LocationShareError}
isMinimised
/>
}
{ !centerGeoUri && !mapDisplayError &&<MapFallback
data-test-id='beacon-view-dialog-map-fallback'
className='mx_BeaconViewDialog_map'
>
<span className='mx_BeaconViewDialog_mapFallbackMessage'>{ _t('No live locations') }</span>
<AccessibleButton
kind='primary'
onClick={onFinished}
data-test-id='beacon-view-dialog-fallback-close'
>
{ _t('Close') }
</AccessibleButton>
</MapFallback>
{ mapDisplayError &&
<MapError
error={mapDisplayError.message as LocationShareError}
isMinimised
/>
}
{ !centerGeoUri && !mapDisplayError && <MapFallback
data-test-id='beacon-view-dialog-map-fallback'
className='mx_BeaconViewDialog_map'
>
<span className='mx_BeaconViewDialog_mapFallbackMessage'>{ _t('No live locations') }</span>
<AccessibleButton
kind='primary'
onClick={onFinished}
data-test-id='beacon-view-dialog-fallback-close'
>
{ _t('Close') }
</AccessibleButton>
</MapFallback> }
{ isSidebarOpen ?
<DialogSidebar beacons={liveBeacons} onBeaconClick={onBeaconListItemClick}requestClose={() => setSidebarOpen(false)} /> :
<AccessibleButton
Expand Down

0 comments on commit 394c261

Please sign in to comment.