Skip to content
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

Refactor useAttachment hook #72

Merged
merged 8 commits into from
Aug 30, 2023
Merged

Refactor useAttachment hook #72

merged 8 commits into from
Aug 30, 2023

Conversation

rygine
Copy link
Collaborator

@rygine rygine commented Aug 30, 2023

This PR refactors the useAttachment hook with the following updates:

  • Added options disableAutoload and autoloadMaxFileSize
  • Added status export
  • Renamed retry => load
  • Prevent autoload from occurring if there was previously a load error

Some additional updates:

  • Added hasLoadError to cached messages for when message content loading fails (this only applies to remote attachments for now)
  • Updated the type of the messages export of the useMessages hook

@rygine rygine requested a review from a team August 30, 2023 15:58
@changeset-bot
Copy link

changeset-bot bot commented Aug 30, 2023

🦋 Changeset detected

Latest commit: 8b0c000

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@xmtp/react-sdk Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@rygine rygine requested a review from jhaaaa as a code owner August 30, 2023 16:41
@rygine rygine merged commit a8c1734 into main Aug 30, 2023
@rygine rygine deleted the rygine/updates2 branch August 30, 2023 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants