hide Install PWA button if already in standalone mode
This commit is contained in:
@ -164,7 +164,7 @@ function PwaManager() {
|
||||
<>
|
||||
<div>
|
||||
<h1>PWA Manager</h1>
|
||||
{!isPWAInstalled && (
|
||||
{!isStandAlone && !isPWAInstalled && (
|
||||
<button
|
||||
onClick={installPWA}
|
||||
className="bg-blue-500 hover:bg-blue-700 text-white text-xs py-1 px-2 rounded-full focus:outline-none focus:shadow-outline transition duration-150 ease-in-out"
|
||||
@ -173,7 +173,7 @@ function PwaManager() {
|
||||
</button>
|
||||
)}
|
||||
{isPWAInstalled && <p>App is installed!</p>}
|
||||
{isStandAlone && <p>App is running in standalone mode!</p>}
|
||||
{isStandAlone && <p>PWA App</p>}
|
||||
<button
|
||||
onClick={subscribeToNotifications}
|
||||
disabled={isSubscribed}
|
||||
|
Reference in New Issue
Block a user