Merge pull request #28241 from backstage/rugvip/fixes
internal type fixes
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
import { AnyJWK, KeyStore, StoredKey } from './types';
|
||||
import { exportJWK, importPKCS8, importSPKI, JWK } from 'jose';
|
||||
import { KeyLike } from 'jose/dist/types/types';
|
||||
import { KeyLike } from 'jose';
|
||||
import { promises as fs } from 'fs';
|
||||
import { Config } from '@backstage/config';
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ import {
|
||||
JWSHeaderParameters,
|
||||
jwtVerify,
|
||||
} from 'jose';
|
||||
import { GetKeyFunction } from 'jose/dist/types/types';
|
||||
import { GetKeyFunction } from 'jose';
|
||||
import { getBearerTokenFromAuthorizationHeader } from './getBearerTokenFromAuthorizationHeader';
|
||||
import { IdentityApi, IdentityApiGetIdentityRequest } from './IdentityApi';
|
||||
import { BackstageIdentityResponse } from '../types';
|
||||
|
||||
@@ -28,7 +28,7 @@ export const LightBoxAddon = () => {
|
||||
useEffect(() => {
|
||||
let dataSourceImages: DataSource | null = null;
|
||||
|
||||
let lightbox = new PhotoSwipeLightbox({
|
||||
let lightbox: PhotoSwipeLightbox | null = new PhotoSwipeLightbox({
|
||||
pswpModule: PhotoSwipe,
|
||||
initialZoomLevel: 1,
|
||||
secondaryZoomLevel: (zoomLevelObject: ZoomLevel) => {
|
||||
@@ -71,14 +71,14 @@ export const LightBoxAddon = () => {
|
||||
};
|
||||
});
|
||||
}
|
||||
lightbox.loadAndOpen(index, dataSourceImages);
|
||||
lightbox?.loadAndOpen(index, dataSourceImages);
|
||||
return false;
|
||||
};
|
||||
});
|
||||
lightbox.init();
|
||||
|
||||
return () => {
|
||||
lightbox.destroy();
|
||||
lightbox?.destroy();
|
||||
lightbox = null;
|
||||
};
|
||||
}, [images]);
|
||||
|
||||
Reference in New Issue
Block a user