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

fix!: move useSession hook to /client entry point #255

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

jonas-jonas
Copy link
Member

Related Issue or Design Document

Checklist

  • I have read the contributing guidelines and signed the CLA.
  • I have referenced an issue containing the design document if my change introduces a new feature.
  • I have read the security policy.
  • I confirm that this pull request does not address a security vulnerability.
    If this pull request addresses a security vulnerability,
    I confirm that I got approval (please contact [email protected]) from the maintainers to push the changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added the necessary documentation within the code base (if appropriate).

Further comments

@jonas-jonas jonas-jonas self-assigned this Oct 30, 2024
@jonas-jonas jonas-jonas force-pushed the jonas-jonas/useSessionFixed branch 2 times, most recently from a9769f9 to 85f6445 Compare October 30, 2024 16:38
@jonas-jonas jonas-jonas changed the title fix!: move useSession hook to its own entry point fix!: move useSession hook to /client entry point Oct 30, 2024
Comment on lines +56 to +57
config?.sdk.url ??
window.location.protocol + "//" + window.location.host,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works very nicely with the next js middleware in #235

@jonas-jonas jonas-jonas force-pushed the jonas-jonas/useSessionFixed branch 2 times, most recently from 76f1f9d to 4809803 Compare October 30, 2024 16:53
@jonas-jonas jonas-jonas merged commit b1ddb3f into main Oct 30, 2024
6 of 10 checks passed
@jonas-jonas jonas-jonas deleted the jonas-jonas/useSessionFixed branch October 30, 2024 17:08
Copy link

codecov bot commented Oct 30, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 58.49%. Comparing base (d95a4ed) to head (51e73c8).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
packages/elements-react/src/client/useSession.ts 80.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #255       +/-   ##
===========================================
+ Coverage   47.31%   58.49%   +11.18%     
===========================================
  Files          96       65       -31     
  Lines        1340      812      -528     
  Branches      183      104       -79     
===========================================
- Hits          634      475      -159     
+ Misses        701      332      -369     
  Partials        5        5               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant