more merge
This commit is contained in:
@ -216,13 +216,22 @@ function PwaManager() {
|
||||
{isPWAInstalled && <p>App is installed!</p>}
|
||||
{isStandAlone && <p>PWA App</p>}
|
||||
<button
|
||||
onClick={isSubscribed ? unsubscribeFromNotifications : subscribeToNotifications}
|
||||
disabled={false} // Since the button itself acts as a toggle, the disabled attribute might not be needed
|
||||
className={`text-xs py-1 px-2 rounded-full focus:outline-none transition duration-150 ease-in-out ${isSubscribed ? 'bg-red-500 hover:bg-red-700 text-white' : 'bg-green-500 hover:bg-green-700 text-white'
|
||||
onClick={subscribeToNotifications}
|
||||
disabled={isSubscribed}
|
||||
className={`text-xs py-1 px-2 rounded-full focus:outline-none transition duration-150 ease-in-out ${isSubscribed ? 'cursor-not-allowed bg-gray-300 text-gray-500' : 'bg-green-500 hover:bg-green-700 text-white'
|
||||
}`}
|
||||
>
|
||||
{isSubscribed ? 'Unsubscribe from Notifications' : 'Subscribe to Notifications'}
|
||||
Subscribe to Notifications
|
||||
</button>
|
||||
<button
|
||||
onClick={unsubscribeFromNotifications}
|
||||
disabled={!isSubscribed}
|
||||
className={`text-xs py-1 px-2 rounded-full focus:outline-none transition duration-150 ease-in-out ${!isSubscribed ? 'cursor-not-allowed bg-gray-300 text-gray-500' : 'bg-red-500 hover:bg-red-700 text-white'
|
||||
}`}
|
||||
>
|
||||
Unsubscribe from Notifications
|
||||
</button>
|
||||
|
||||
|
||||
</div>
|
||||
<div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
||||
//we're currently using next-pwa (which uses GeneraeSW automatically), so we don't need to use workbox-webpack-plugin
|
||||
const { InjectManifest, GenerateSW } = require('workbox-webpack-plugin');
|
||||
// const { InjectManifest, GenerateSW } = require('workbox-webpack-plugin');
|
||||
|
||||
const withPWA = require('next-pwa')({
|
||||
dest: 'public',
|
||||
|
Reference in New Issue
Block a user