Fix TypeScript type for direct storage image flag.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
b9bef5e264
commit
fd8f12a7bc
@ -35,9 +35,11 @@ export default function ImageWithFallback({
|
||||
useState(!hasLoadedWithAnimations);
|
||||
|
||||
const srcString = typeof props.src === 'string' ? props.src : undefined;
|
||||
const useDirectStorage = DIRECT_STORAGE_IMAGES &&
|
||||
Boolean(srcString) &&
|
||||
isExternalStoragePhotoUrl(srcString!);
|
||||
const useDirectStorage = Boolean(
|
||||
DIRECT_STORAGE_IMAGES &&
|
||||
srcString &&
|
||||
isExternalStoragePhotoUrl(srcString),
|
||||
);
|
||||
const displayWidth = typeof props.width === 'number' ? props.width : 640;
|
||||
const directSrc = useDirectStorage && srcString && !fallbackSrc
|
||||
? getDirectPhotoDisplayUrl(srcString, displayWidth)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user