Skip to content

Commit

Permalink
removing console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
Dav1nx1 committed Mar 13, 2024
1 parent da19c4a commit 4ac87ef
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/FileInput.aws.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ export const FileInputAws: React.FC<AWSFileInputProps> = ({
originalFile,
error,
} = useFilePicker({ uploadCallback, controlledValue, onChange ,errorCallback});
console.log(error);
//console.log(error);

const pick = useCallback(
(pickerOptions: PickerOptions = {}) => {
Expand All @@ -122,7 +122,7 @@ export const FileInputAws: React.FC<AWSFileInputProps> = ({

const handleAWSUpload = () => {
// eslint-disable-next-line no-console
console.log(useFilestack, workspace, apiKey, uploadHost, environment);
//console.log(useFilestack, workspace, apiKey, uploadHost, environment);
upload(useFilestack, workspace, apiKey, uploadHost, environment);
};

Expand Down
4 changes: 2 additions & 2 deletions src/components/FilePicker/view/FilePicker.content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export const FilePickerContent = ({
errorMessage
}: FilePickerContentProps) => {
const shouldShowError = errorMessage;
console.log(shouldShowError);
console.log(step);
//console.log(shouldShowError);
//console.log(step);

switch (step) {
case STEPS.select: {
Expand Down
24 changes: 12 additions & 12 deletions src/hooks/useFilePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ export const useFilePicker = ({
let currentList = [...list];
return (index: number) => (progress: number) => {
const newList = [...currentList];
console.log(newList);
//console.log(newList);
newList[index] = progress;
currentList = [...newList];
setFileProgressList(newList);
Expand All @@ -138,16 +138,16 @@ export const useFilePicker = ({

const handleUploadDone = useCallback(
(filesUploaded: FileValue[], file: File[]) => {
console.log("πŸš€ ~ newValue:", filesUploaded)
//console.log("πŸš€ ~ newValue:", filesUploaded)
let newValue: FileInputState['value'] = [...filesUploaded];
console.log("πŸš€ ~ newValue:", newValue)
//console.log("πŸš€ ~ newValue:", newValue)
let newOriginalFile: FileInputState['originalFile'] = [...file];
console.log("πŸš€ ~ newOriginalFile:", newOriginalFile)
//console.log("πŸš€ ~ newOriginalFile:", newOriginalFile)

const { maxFiles } = options;

console.log("πŸš€ ~ newOriginalFile:", maxFiles)
console.log("πŸš€ ~ options:", options)
//console.log("πŸš€ ~ newOriginalFile:", maxFiles)
//console.log("πŸš€ ~ options:", options)

if (maxFiles === 1) {
newValue = newValue[0];
Expand All @@ -172,10 +172,10 @@ export const useFilePicker = ({

const upload = useCallback(( useFilestack, workspace, apiKey, uploadHost, environment ) => {

console.log("πŸš€ ~ upload ~ workspace:", workspace)
console.log("πŸš€ ~ upload ~ apiKey:", apiKey)
console.log("πŸš€ ~ upload ~ uploadHost:", uploadHost)
console.log("πŸš€ ~ upload ~ environment:", environment)
//console.log("πŸš€ ~ upload ~ workspace:", workspace)
//console.log("πŸš€ ~ upload ~ apiKey:", apiKey)
//console.log("πŸš€ ~ upload ~ uploadHost:", uploadHost)
//console.log("πŸš€ ~ upload ~ environment:", environment)

const newProgressList = fileList.map(el => 0);
setFileProgressList(newProgressList);
Expand All @@ -190,7 +190,7 @@ export const useFilePicker = ({
const uploadedOriginalFileList: File[] = [];

const handleProgress = onProgress(newProgressList);
console.log(fileList);
//console.log(fileList);
const loadFiles = fileList.map((file, index) => {
const formdata = new FormData();
if (useFilestack) {
Expand Down Expand Up @@ -246,7 +246,7 @@ export const useFilePicker = ({
public: response.data.data[0].public,
});
} else {
console.log('uploaded file with error', file)
//console.log('uploaded file with error', file)
}
})
.catch(error => {
Expand Down

0 comments on commit 4ac87ef

Please sign in to comment.