From cb35ed18c9c6630e87688c0d1fa55ae4a49987c9 Mon Sep 17 00:00:00 2001 From: Mauro Balades Date: Wed, 3 Jul 2024 20:04:54 +0200 Subject: [PATCH] refactor: Remove unused import in download.tsx --- src/components/download.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/download.tsx b/src/components/download.tsx index 9da7139..34d71b1 100644 --- a/src/components/download.tsx +++ b/src/components/download.tsx @@ -3,7 +3,7 @@ import { ny } from "@/lib/utils"; import GridPattern from "./ui/grid-pattern"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "./ui/tabs"; -import { DownloadCloudIcon, DownloadIcon } from "lucide-react"; +import { DownloadIcon } from "lucide-react"; const BASE_URL = "https://github.com/zen-browser/desktop/releases/download/latest"; @@ -18,7 +18,10 @@ const releases: any = { }; function getDefaultPlatformBasedOnUserAgent() { - const userAgent = window.navigator.userAgent; + let userAgent = ""; + if (typeof window !== "undefined") { + userAgent = window.navigator.userAgent; + } if (userAgent.includes("Win")) { return "Windows"; }