hide Install PWA button if already in standalone mode
This commit is contained in:
@ -164,7 +164,7 @@ function PwaManager() {
|
|||||||
<>
|
<>
|
||||||
<div>
|
<div>
|
||||||
<h1>PWA Manager</h1>
|
<h1>PWA Manager</h1>
|
||||||
{!isPWAInstalled && (
|
{!isStandAlone && !isPWAInstalled && (
|
||||||
<button
|
<button
|
||||||
onClick={installPWA}
|
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"
|
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>
|
</button>
|
||||||
)}
|
)}
|
||||||
{isPWAInstalled && <p>App is installed!</p>}
|
{isPWAInstalled && <p>App is installed!</p>}
|
||||||
{isStandAlone && <p>App is running in standalone mode!</p>}
|
{isStandAlone && <p>PWA App</p>}
|
||||||
<button
|
<button
|
||||||
onClick={subscribeToNotifications}
|
onClick={subscribeToNotifications}
|
||||||
disabled={isSubscribed}
|
disabled={isSubscribed}
|
||||||
|
Reference in New Issue
Block a user