From d93c85d7ce07a77e1defd2907a7ed30d9c4a24ea Mon Sep 17 00:00:00 2001 From: Joshen Lim Date: Tue, 13 Dec 2022 12:25:56 +0700 Subject: [PATCH] Fix build --- .../interfaces/Support/SupportForm.utils.ts | 29 ++++++++++--------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/studio/components/interfaces/Support/SupportForm.utils.ts b/studio/components/interfaces/Support/SupportForm.utils.ts index 46f3ca577e5..cc080f2ce22 100644 --- a/studio/components/interfaces/Support/SupportForm.utils.ts +++ b/studio/components/interfaces/Support/SupportForm.utils.ts @@ -4,22 +4,23 @@ import { uuidv4 } from 'lib/helpers' const SUPPORT_API_URL = process.env.NEXT_PUBLIC_SUPPORT_API_URL || '' const SUPPORT_API_KEY = process.env.NEXT_PUBLIC_SUPPORT_ANON_KEY || '' -const supportSupabaseClient = createClient(SUPPORT_API_URL, SUPPORT_API_KEY, { - auth: { - persistSession: false, - autoRefreshToken: false, - // @ts-ignore - multiTab: false, - detectSessionInUrl: false, - localStorage: { - getItem: (key: string) => undefined, - setItem: (key: string, value: string) => {}, - removeItem: (key: string) => {}, - }, - }, -}) export const uploadAttachments = async (ref: string, files: File[]) => { + const supportSupabaseClient = createClient(SUPPORT_API_URL, SUPPORT_API_KEY, { + auth: { + persistSession: false, + autoRefreshToken: false, + // @ts-ignore + multiTab: false, + detectSessionInUrl: false, + localStorage: { + getItem: (key: string) => undefined, + setItem: (key: string, value: string) => {}, + removeItem: (key: string) => {}, + }, + }, + }) + const filesToUpload = Array.from(files) const uploadedFiles = await Promise.all( filesToUpload.map(async (file) => {