Clean up console logs

This commit is contained in:
Chuck Dries 2021-07-11 21:17:34 -07:00
parent 039df7958c
commit 857789b810
2 changed files with 4 additions and 6 deletions

View File

@ -166,7 +166,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
const edges = R.sort(R.descend((edge) =>
new Date(R.path(['node', 'fields', 'imageMeta', 'dateTaken'], edge))),
galleryImages.data.allFile.edges);
console.log('edges', edges[0].node.fields.imageMeta);
edges.forEach(({ node }, index) => {
const nextImage = index === edges.length - 1
@ -184,7 +183,6 @@ exports.createPages = async ({ graphql, actions, reporter }) => {
prevImage,
},
};
console.log('page', page);
createPage(page);
});
};

View File

@ -39,12 +39,12 @@ const gcd = (a, b) => {
export const getShutterFractionFromExposureTime = (exposureTime) => {
let fraction = exposureTime;
var len = fraction.toString().length - 2;
const len = fraction.toString().length - 2;
var denominator = Math.pow(10, len);
var numerator = fraction * denominator;
let denominator = Math.pow(10, len);
let numerator = fraction * denominator;
var divisor = gcd(numerator, denominator);
const divisor = gcd(numerator, denominator);
numerator /= divisor;
denominator /= divisor;