-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix 51888 cors errors are displayed for attachments #53407
Merged
rlinoz
merged 35 commits into
Expensify:main
from
Kalydosos:fix-51888-cors-errors-are-displayed-for-attachments
Jan 8, 2025
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e8c5c33
fix cors issues in attachments
Kalydosos b3371ae
fix cors issues in attachments
Kalydosos 28f7a27
fix cors issues
Kalydosos 433717d
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Kalydosos 88cf61a
Update
Kalydosos be7f93b
fix cors issues
Kalydosos f797f2f
fix cors issues
Kalydosos bc0c48b
fix cors issues
Kalydosos c7aab35
fix cors issues
Kalydosos e5d504d
fix cors issues
Kalydosos 170e7e8
fix cors issues
Kalydosos 7ba9f8a
fix cors issues
Kalydosos d25f0b0
fix cors errors on attachments
Kalydosos 65fb38c
fix cors errors on attachments
Kalydosos d9cbf9f
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Kalydosos 3040f19
fix cors errors on attachments
Kalydosos cdf9209
Merge branch 'fix-51888-cors-errors-are-displayed-for-attachments' of…
Kalydosos bffc444
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Kalydosos b9f1240
Merge branch 'fix-51888-cors-errors-are-displayed-for-attachments' of…
Kalydosos 93a3c05
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Kalydosos 873dcec
fix cors errors on attachments
Kalydosos 5cbae41
fix cors errors on attachments
Kalydosos ae15c5b
fix cors errors on attachments
Kalydosos ee77c8d
Merge branch 'main' into fix-51888-cors-errors-are-displayed-for-atta…
Kalydosos bbe9e2e
fix cors errors on attachments
Kalydosos 80fff80
Merge branch 'main' into fix-51888-cors-errors-are-displayed-for-atta…
Kalydosos 1c7807a
Update src/CONST.ts
Kalydosos 4174956
Update src/components/Image/index.tsx
Kalydosos 528a03c
Update src/components/Image/index.tsx
Kalydosos c66c460
updates after review
Kalydosos 7cb8b5f
Merge branch 'fix-51888-cors-errors-are-displayed-for-attachments' of…
Kalydosos fe93bc8
updates after review
Kalydosos c9dc455
updates after review
Kalydosos d78885f
Merge branch 'Expensify:main' into fix-51888-cors-errors-are-displaye…
Kalydosos f026b07
updates after review
Kalydosos File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -234,6 +234,14 @@ function Lightbox({isAuthTokenRequired = false, uri, onScaleChanged: onScaleChan | |
updateContentSize(e); | ||
setLightboxImageLoaded(true); | ||
}} | ||
waitForSession={() => { | ||
// only active lightbox should call this function | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we explain why in the comment please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok |
||
if (!isActive || isFallbackVisible || !isLightboxVisible) { | ||
return; | ||
} | ||
setContentSize(cachedImageDimensions.get(uri)); | ||
setLightboxImageLoaded(false); | ||
}} | ||
/> | ||
</MultiGestureCanvas> | ||
</View> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have a hook called
usePrevious
, let use it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok i'll check that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did we give up on using
usePrevious
?