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

Commit 394c261

Browse files
committed
Delint
1 parent 1af0476 commit 394c261

File tree

2 files changed

+21
-26
lines changed

2 files changed

+21
-26
lines changed

src/@types/global.d.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -174,12 +174,7 @@ declare global {
174174
}
175175

176176
interface HTMLDialogElement {
177-
readonly open: boolean;
178-
returnValue?: string;
179177
oncancel?(ev: Event);
180-
show(): void;
181-
showModal(): void;
182-
close(returnValue?: string): void;
183178
}
184179

185180
// Add Chrome-specific `instant` ScrollBehaviour

src/components/views/beacon/BeaconViewDialog.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
import React, { useState, useEffect } from 'react';
17+
import React, { useState, useEffect, useContext } from 'react';
1818
import {
1919
Beacon,
2020
Room,
@@ -136,7 +136,8 @@ const BeaconViewDialog: React.FC<IProps> = ({
136136
id='mx_BeaconViewDialog'
137137
bounds={bounds}
138138
centerGeoUri={centerGeoUri}
139-
interactiveonError={setMapDisplayError}
139+
interactive
140+
onError={setMapDisplayError}
140141
className="mx_BeaconViewDialog_map"
141142
>
142143
{
@@ -152,26 +153,25 @@ const BeaconViewDialog: React.FC<IProps> = ({
152153
</>
153154
}
154155
</Map> }
155-
{ mapDisplayError &&
156-
<MapError
157-
error={mapDisplayError.message as LocationShareError}
158-
isMinimised
159-
/>
160-
}
161-
{ !centerGeoUri && !mapDisplayError &&<MapFallback
162-
data-test-id='beacon-view-dialog-map-fallback'
163-
className='mx_BeaconViewDialog_map'
164-
>
165-
<span className='mx_BeaconViewDialog_mapFallbackMessage'>{ _t('No live locations') }</span>
166-
<AccessibleButton
167-
kind='primary'
168-
onClick={onFinished}
169-
data-test-id='beacon-view-dialog-fallback-close'
170-
>
171-
{ _t('Close') }
172-
</AccessibleButton>
173-
</MapFallback>
156+
{ mapDisplayError &&
157+
<MapError
158+
error={mapDisplayError.message as LocationShareError}
159+
isMinimised
160+
/>
174161
}
162+
{ !centerGeoUri && !mapDisplayError && <MapFallback
163+
data-test-id='beacon-view-dialog-map-fallback'
164+
className='mx_BeaconViewDialog_map'
165+
>
166+
<span className='mx_BeaconViewDialog_mapFallbackMessage'>{ _t('No live locations') }</span>
167+
<AccessibleButton
168+
kind='primary'
169+
onClick={onFinished}
170+
data-test-id='beacon-view-dialog-fallback-close'
171+
>
172+
{ _t('Close') }
173+
</AccessibleButton>
174+
</MapFallback> }
175175
{ isSidebarOpen ?
176176
<DialogSidebar beacons={liveBeacons} onBeaconClick={onBeaconListItemClick}requestClose={() => setSidebarOpen(false)} /> :
177177
<AccessibleButton

0 commit comments

Comments
 (0)