You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: sync Next.js push guide with tutorial app layout changes
- Add 'use client' to page.tsx snippet
- Lift device ID display above the log area in PushApp
- Pass onDeviceChange callback through PushActivationBanner
- Move Clear button below the log in NotificationLog
- Reduce flex gap from 20px to 10px
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- **`activate`**: Registers the browser for push notifications. Requests notification permission, registers the service worker, and records the device with Ably.
186
196
- **`deactivate`**: Removes the device registration from Ably's servers. Call this only on explicit user opt-out.
187
-
- **`localDevice`**: The current `LocalDevice` if activated, `null` otherwise. Reactive — updates immediately when `activate` or `deactivate` is called, and is re-populated from `localStorage` on page load if the device was activated in a prior session.
197
+
- **`localDevice`**: The current `LocalDevice` if activated, `null` otherwise. Reactive — updates immediately when `activate` or `deactivate` is called, and is re-populated from `localStorage` on page load if the device was activated in a prior session. Here it is propagated upward via `onDeviceChange` so the parent can display the device ID above the log.
0 commit comments