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

perf: added error Handling for homepage component #9

Closed
wants to merge 1 commit into from

Conversation

HarshMN2345
Copy link

@HarshMN2345 HarshMN2345 commented Oct 7, 2023

It introduces error handling for useCurrentUser errors, adds a loading state, implements an authentication redirect, and improves code organization.

It introduces error handling for useCurrentUser errors, adds a loading state, implements an authentication redirect, and improves code organization.
@github-actions
Copy link

github-actions bot commented Oct 7, 2023

Thank you for following the naming conventions! 🙏

@HarshMN2345 HarshMN2345 changed the title Added error Handling for homepage component test:Added error Handling for homepage component Oct 7, 2023
@HarshMN2345 HarshMN2345 changed the title test:Added error Handling for homepage component perf: added error Handling for homepage component Oct 7, 2023
Comment on lines +15 to +23
if (error) {
setErrorMessage('An error occurred while fetching user data. Please try again later.')
}

if (user && !isLoading) {
router.replace('/dashboard')
}

if (!user && !isLoading) {
Copy link
Owner

Choose a reason for hiding this comment

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

Hi @HarshMN2345
Thanks for contributing 😄.

This is the homepage as we would like a Landing page here. We don't want to redirect the user to /dashboard.

Also, the dashboard is at app.localhost:3000/dashboard subdomain 😄

But great code 🎉

@piyushgarg-dev
Copy link
Owner

Also please mention #issue-number in description ✨

@piyushgarg-dev
Copy link
Owner

@HarshMN2345 Please update the issue number, You have mentioned wrong issue number

@github-actions github-actions bot added 🚨 merge conflict Merge Conflict and removed 🚨 merge conflict Merge Conflict labels Oct 8, 2023
@github-actions
Copy link

Hey there, there is a merge conflict, can you take a look?

@github-actions github-actions bot added the 🚨 merge conflict Merge Conflict label Oct 18, 2023
Copy link
Collaborator

@hemantwasthere hemantwasthere left a comment

Choose a reason for hiding this comment

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

There are so many bugs in the code so closing the PR

@HarshMN2345 HarshMN2345 deleted the patch-1 branch October 25, 2023 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 merge conflict Merge Conflict
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants