-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(platofrm): Added online/offline status detection in the platform #585
feat(platofrm): Added online/offline status detection in the platform #585
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
@kriptonian1 @poswalsameer can you drop your reviews? |
@rajdip-b I can implement suggestions given my code bot reviewer. |
Just the one that I marked, the others are not needed
|
Yeah sure1 |
Hi @Allan2000-Git, can you please attach some screenshots with the PR? |
All looks good to me. I think instead of using setTimeout, we should have a |
Cool, will make the change & update |
did the state thing worked? |
went through code, to keep it much cleaner, we do not require state actually as we're directly using the hook in the client component. state usage would be much more useful if we're using that state anywhere apart from self component |
Sounds fine. @rajdip-b, I think we can merge this. |
@kriptonian1 final thoughts? if you can approve it, I'll merge it asap |
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.
LGTM
User description
Description
This PR introduces functionality to detect and display the online/offline status of the platform using a toast message.
Fixes #499
Dependencies
N/A
Future Improvements
N/A
Mentions
@rajdip-b
Screenshots of relevant screens
I have throttled the network for testing the functionality.
https://www.loom.com/share/10eb3fcf518b40179a4ce52f92b46fa7
Developer's checklist
If changes are made in the code:
Documentation Update
PR Type
enhancement
Description
OnlineStatusHandler
component to manage online/offline status detection.useOnlineStatus
hook to listen for network status changes and display toast notifications.OnlineStatusHandler
into the main application layout to provide real-time feedback on internet connectivity.Changes walkthrough 📝
layout.tsx
Integrate online status handler in the application layout
apps/platform/src/app/layout.tsx
OnlineStatusHandler
component to the layout.OnlineStatusHandler
is wrapped byJotaiProvider
.online-status-handler.tsx
Create OnlineStatusHandler component for status detection
apps/platform/src/components/common/online-status-handler.tsx
OnlineStatusHandler
component.useOnlineStatus
hook within the component.use-online-status.ts
Implement useOnlineStatus hook for connection status
apps/platform/src/hooks/use-online-status.ts
useOnlineStatus
hook.