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(requests): Refactor requests folder #408

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

deo002
Copy link
Contributor

@deo002 deo002 commented Dec 16, 2024

No description provided.

return null
async (url: string, signal: AbortSignal) => {
try {
if (CommonUtils.isNullOrUndefined(session)) return signOut()
Copy link
Contributor

Choose a reason for hiding this comment

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

I know you are working on this PR, but I have a comment. If you use useSession(), there is a delay (loading time) before the session is retrieved. So, if you call this fetch function inside useEffect() and the session has not been retrieved yet, the user might be logged out. I think you should use getSession() instead to avoid that problem.

@deo002 deo002 removed the WIP label Dec 20, 2024
@deo002 deo002 requested a review from hoangnt2 December 20, 2024 12:39
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.

2 participants