Skip to content

Commit f6bc854

Browse files
committed
Clean code
1 parent 87bb242 commit f6bc854

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/app.jsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,10 @@ function App() {
7474
event.stopPropagation();
7575
event.preventDefault();
7676

77-
console.log(event);
78-
7977
const dt = event.dataTransfer;
8078
const files = dt ? dt.files : event.target.files;
8179
const file = files[0];
8280

83-
// const file = dt.file;
84-
8581
const fr = new window.FileReader();
8682

8783
loadingImageSet(true);
@@ -94,6 +90,8 @@ function App() {
9490
base64ImageToRGBMatrix(base64, (err, data) => {
9591
if (err) return console.error(err);
9692

93+
console.log(data);
94+
9795
rgbMatrixSet(data);
9896
loadingImageSet(false);
9997
});
@@ -109,13 +107,12 @@ function App() {
109107
const masterShadow = _.map(rgbMatrix, (row, rowIndex) => {
110108
return _.map(row, (col, colIndex) => {
111109
const color = compressColor(`rgb(${col.r},${col.g},${col.b})`);
112-
113110
return `${color} ${colIndex ? colIndex + "px" : 0} ${rowIndex ? rowIndex + "px" : 0}`;
114111
}).join(",");
115112
}).join(",");
116113

117114
const handleFocus = (event) => {
118-
console.log("on click");
115+
event.preventDefault();
119116
event.stopPropagation();
120117
event.target.select();
121118
};

0 commit comments

Comments
 (0)