From 29acdcf9aa4028ab7500706e29003e67be7d8fd5 Mon Sep 17 00:00:00 2001 From: katecourabi <160359084+katecourabi@users.noreply.github.com> Date: Sat, 23 Mar 2024 16:16:36 -0400 Subject: [PATCH] edited code for removing image upload (#214) * edited code for removing image upload * removed image upload options but commented out instead of deleted * linting fixes * linting fixes pt 2 --------- Co-authored-by: Kate Bicalho Co-authored-by: Michelle Li --- client/src/components/AddItemButton.tsx | 16 ++++++++-------- client/src/components/EditItem.tsx | 20 ++++++++++---------- client/src/components/TableWidget.tsx | 10 +++++----- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/client/src/components/AddItemButton.tsx b/client/src/components/AddItemButton.tsx index b568456..7240215 100644 --- a/client/src/components/AddItemButton.tsx +++ b/client/src/components/AddItemButton.tsx @@ -148,12 +148,12 @@ function AddItemButton(props: { const handleRadioChange = (e: any, { name, value }: any) => { setState({ ...state, [name]: value === "true" }); }; - const handleFileChange = ( - e: React.ChangeEvent, - { name, value }: any - ) => { - setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] }); - }; + // const handleFileChange = ( + // e: React.ChangeEvent, + // { name, value }: any + // ) => { + // setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] }); + // }; const uploadImage = (imageFile: File) => { const imageName = "test"; @@ -551,13 +551,13 @@ function AddItemButton(props: { onChange={handleChange} error={buildingError} /> - + /> */} {state.identifiable ? ( { setState({ ...state, [name]: value === "true" }); }; - const handleFileChange = ( - e: React.ChangeEvent, - { name, value }: any - ) => { - console.log("handling file change"); - console.log(name + " " + value); - setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] }); - }; + // const handleFileChange = ( + // e: React.ChangeEvent, + // { name, value }: any + // ) => { + // console.log("handling file change"); + // console.log(name + " " + value); + // setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] }); + // }; const uploadImage = (imageFile: File) => { console.log("attempting to edit image"); @@ -404,13 +404,13 @@ function EditItem(props: { onChange={handleChange} /> - + /> */} {state.identifiable ? ( Building - changeSort("image")} > Image - + */} {!props.isArchivedItems && props.isUser ? ( {item.whereFound} {item.description} {item.building} - + {/* - + */} {!props.isArchivedItems && props.isUser ? (