fix: added id to file input

This commit is contained in:
anjy7
2023-10-30 19:03:01 +05:30
parent 3cf1e7ad3b
commit 8546ce918c
2 changed files with 2 additions and 2 deletions

View File

@@ -5,9 +5,10 @@ export default function ImageSurveyBg({ localSurvey, handleBgChange }) {
<div className="mb-2 mt-4 w-full rounded-lg border bg-slate-50 p-4">
<div className="mt-3 flex w-full items-center justify-center">
<FileInput
id="choices-file-input"
allowedFileExtensions={["png", "jpeg", "jpg"]}
environmentId={localSurvey.environmentId}
onFileUpload={(url: string) => {
onFileUpload={(url: string[]) => {
handleBgChange(url, "image");
}}
fileUrl={localSurvey?.welcomeCard?.fileUrl}

View File

@@ -17,7 +17,6 @@ import {
} from "@heroicons/react/24/solid";
import { Variants, motion } from "framer-motion";
import { useEffect, useRef, useState } from "react";
import { useRouter } from "next/navigation";
import PreviewSurveyBgMobile from "@/app/(app)/environments/[environmentId]/surveys/components/PreviewSurveyBgMobile";
import PreviewSurveyBgDeskstop from "@/app/(app)/environments/[environmentId]/surveys/components/PreviewSurveyBgDeskstop";