From e197f2b81676197a69e204a8616e2ce42f43e136 Mon Sep 17 00:00:00 2001 From: "Visal .In" Date: Thu, 9 Jan 2025 09:06:17 +0700 Subject: [PATCH] fixing missing unused environment variable --- src/lib/utils.ts | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 64dfdfa3..847ad75b 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,4 +1,3 @@ -import { env } from "@/env"; import { type ClassValue, clsx } from "clsx"; import { twMerge } from "tailwind-merge"; @@ -29,19 +28,6 @@ export function concat(...inputs: string[]) { return inputs.join(""); } -/** - * Get the file url from the filename - * @example - * const url = getFileUrl("filename.jpg") - * // https://r2.example.com/filename.jpg - * // make sure to set the R2_PUBLIC_URL in the .env - */ -export function getFileUrl(filename: string) { - // If the R2_PUBLIC_URL is not set fallback to a dummy url - const url = new URL(filename, env.R2_PUBLIC_URL ?? "no-public-url.com"); - return url.toString(); -} - export interface ApiErrorResponse { message: string; detailedMessage?: string;