Skip to content

Commit

Permalink
linting fixes pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
michellejli77 committed Mar 16, 2024
1 parent c1ba0c2 commit e0ab12a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions client/src/components/AddItemButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ function AddItemButton(props: {
const handleRadioChange = (e: any, { name, value }: any) => {
setState({ ...state, [name]: value === "true" });
};
const handleFileChange = (
e: React.ChangeEvent<HTMLInputElement>,
{ name, value }: any
) => {
setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] });
};
// const handleFileChange = (
// e: React.ChangeEvent<HTMLInputElement>,
// { name, value }: any
// ) => {
// setState({ ...state, [name]: value, imageObject: e?.target?.files?.[0] });
// };

const uploadImage = (imageFile: File) => {
const imageName = "test";
Expand Down
16 changes: 8 additions & 8 deletions client/src/components/EditItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ function EditItem(props: {
const handleRadioChange = (e: any, { name, value }: any) => {
setState({ ...state, [name]: value === "true" });
};
const handleFileChange = (
e: React.ChangeEvent<HTMLInputElement>,
{ 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<HTMLInputElement>,
// { 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");
Expand Down

0 comments on commit e0ab12a

Please sign in to comment.