See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope>
is optional
import React, { useState, useEffect } from 'react'; | |
// I'm using react-bootstrap for UI elements | |
import { Table, Button, ButtonGroup } from 'react-bootstrap'; | |
// Firebase config | |
import { getFirestore, collection, query, orderBy, limit, startAfter, endBefore, onSnapshot } from 'firebase/firestore'; | |
import { getApp } from 'firebase/app'; | |
export default function App() { | |
const [list, setList] = useState([]); | |
const [page, setPage] = useState(1); |
//for zoom detection | |
px_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth; | |
function isZooming(){ | |
var newPx_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth; | |
if(newPx_ratio != px_ratio){ | |
px_ratio = newPx_ratio; | |
console.log("zooming"); | |
return true; | |
}else{ |
-='cd -' | |
...=../.. | |
....=../../.. | |
.....=../../../.. | |
......=../../../../.. | |
1='cd -' | |
2='cd -2' | |
3='cd -3' | |
4='cd -4' | |
5='cd -5' |
upload(files) { | |
const config = { | |
onUploadProgress: function(progressEvent) { | |
var percentCompleted = Math.round((progressEvent.loaded * 100) / progressEvent.total) | |
console.log(percentCompleted) | |
} | |
} | |
let data = new FormData() | |
data.append('file', files[0]) |