fix null state

This commit is contained in:
Vikeo
2024-05-27 10:58:42 +02:00
parent 2ec9998a2a
commit 63fbceafe2
2 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,7 @@ import { useEffect, useRef, useState } from 'react';
import { BeforeInstallPromptEvent } from '../../global';
import { useAnalytics } from '../../Hooks/useAnalytics';
export const InstallPWA = () => {
export const InstallPWAButton = () => {
const supportsPWARef = useRef<boolean>(false);
const [promptInstall, setPromptInstall] =
useState<BeforeInstallPromptEvent | null>(null);
@@ -22,7 +22,7 @@ export const InstallPWA = () => {
}, []);
if (!supportsPWARef.current) {
return 'lull';
return null;
}
return (