Skip to content

Commit

Permalink
fixing missing unused environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
invisal committed Jan 9, 2025
1 parent adc9593 commit e197f2b
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions src/lib/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { env } from "@/env";
import { type ClassValue, clsx } from "clsx";
import { twMerge } from "tailwind-merge";

Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit e197f2b

Please sign in to comment.