env validation

This commit is contained in:
Michael Freno
2025-12-21 12:48:12 -05:00
parent f916cb1d52
commit e761844e6f
7 changed files with 107 additions and 104 deletions

View File

@@ -2,6 +2,7 @@ import { createSignal, createEffect, For, Show } from "solid-js";
import Dropzone from "./Dropzone";
import XCircle from "~/components/icons/XCircle";
import AddImageToS3 from "~/lib/s3upload";
import { env } from "~/env/client";
export interface AddAttachmentSectionProps {
type: "blog" | "project";
@@ -92,7 +93,7 @@ export default function AddAttachmentSection(props: AddAttachmentSectionProps) {
const copyToClipboard = async (key: string) => {
try {
const bucketString = import.meta.env.VITE_AWS_BUCKET_STRING || "";
const bucketString = env.VITE_AWS_BUCKET_STRING || "";
await navigator.clipboard.writeText(bucketString + key);
console.log("Text copied to clipboard");
} catch (err) {