feat: add Polish and English language switcher
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import { Download } from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { useI18n } from "@/lib/i18n";
|
||||
|
||||
interface BeforeInstallPromptEvent extends Event {
|
||||
prompt: () => Promise<void>;
|
||||
@@ -11,6 +12,7 @@ interface BeforeInstallPromptEvent extends Event {
|
||||
|
||||
export function InstallPWAButton() {
|
||||
const [event, setEvent] = useState<BeforeInstallPromptEvent | null>(null);
|
||||
const { t } = useI18n();
|
||||
useEffect(() => {
|
||||
const handlePrompt = (promptEvent: Event) => {
|
||||
promptEvent.preventDefault();
|
||||
@@ -31,7 +33,7 @@ export function InstallPWAButton() {
|
||||
}}
|
||||
>
|
||||
<Download className="size-4" />
|
||||
Zainstaluj
|
||||
{t("pwa.install")}
|
||||
</Button>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user