feat: add Polish and English language switcher

This commit is contained in:
zv
2026-06-01 18:54:08 +02:00
parent 840555f4f5
commit 6c2e731c60
29 changed files with 531 additions and 143 deletions

View File

@@ -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>
);
}