Skip to content

Commit

Permalink
chore: cleanup console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewlilley committed Aug 21, 2021
1 parent 24c9f62 commit c87313c
Show file tree
Hide file tree
Showing 8 changed files with 17,275 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ NEXT_PUBLIC_ARCHER_API_KEY=""
NEXT_PUBLIC_CLOUDINARY_URL=""
NEXT_PUBLIC_GOOGLE_ANALYTICS=""
NEXT_PUBLIC_INTO_THE_BLOCK_API_KEY=""
NEXT_PUBLIC_SENTRY_DSN=""
NEXT_PUBLIC_SENTRY_DSN=""
REDIS_URL=""
13 changes: 5 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@
"@commitlint/config-conventional": "^13.0.0",
"@ethereumjs/common": "^2.4.0",
"@ethereumjs/tx": "^3.3.0",
"@ethersproject/abstract-provider": "^5.4.0",
"@ethersproject/abi": "^5.4.0",
"@ethersproject/bytes": "^5.4.0",
"@ethersproject/abstract-provider": "^5.4.0",
"@ethersproject/address": "^5.4.0",
"@ethersproject/bignumber": "^5.4.0",
"@ethersproject/hash": "^5.4.0",
"@ethersproject/bytes": "^5.4.0",
"@ethersproject/constants": "^5.4.0",
"@ethersproject/keccak256": "^5.4.0",
"@ethersproject/contracts": "^5.4.0",
"@ethersproject/hash": "^5.4.0",
"@ethersproject/keccak256": "^5.4.0",
"@ethersproject/providers": "^5.4.0",
"@ethersproject/strings": "^5.4.0",
"@ethersproject/units": "^5.4.0",
Expand Down Expand Up @@ -103,14 +103,14 @@
"cookie-cutter": "^0.2.0",
"copy-to-clipboard": "^3.3.1",
"cypress": "8.2.0",
"eip-712": "^0.4.3",
"eslint": "^7.30.0",
"eslint-config-next": "^11.1.0",
"eth-permit": "^0.1.10",
"fuse.js": "^6.4.6",
"graphql-tag": "^2.12.5",
"husky": "^7.0.0",
"ioredis": "^4.27.7",
"limitorderv2-sdk": "^0.1.62",
"lint-staged": "^11.0.0",
"lodash": "^4.17.21",
"lottie-react": "^2.1.0",
Expand All @@ -135,17 +135,14 @@
"react-ga": "^3.3.0",
"react-popper": "^2.2.5",
"react-redux": "^7.2.4",
"react-spring": "^8.0.27",
"react-table": "^7.7.0",
"react-test-renderer": "^17.0.2",
"react-use-gesture": "^9.1.3",
"react-virtualized": "^9.22.3",
"react-virtualized-auto-sizer": "^1.0.5",
"react-window": "^1.8.6",
"react-window-infinite-loader": "^1.0.7",
"redux": "^4.1.0",
"redux-devtools-extension": "^2.13.9",
"redux-localstorage-simple": "^2.4.1",
"redux-persist": "^6.0.0",
"serve": "^12.0.0",
"sharp": "^0.29.0",
Expand Down
3 changes: 0 additions & 3 deletions postcss.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,3 @@ module.exports = {
],
],
}
// module.exports = {
// plugins: ['tailwindcss', ['postcss-preset-env', { stage: 1 }]],
// }
24 changes: 12 additions & 12 deletions src/bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,18 @@ import React from 'react'
import { Zero } from '@ethersproject/constants'
import { parseUnits } from '@ethersproject/units'

if (typeof window !== 'undefined' && process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render')

// See https://github.com/welldone-software/why-did-you-render#options
whyDidYouRender(React, {
trackAllPureComponents: true,
trackHooks: true,
logOwnerReasons: true,
collapseGroups: true,
})
}

BigNumber.prototype.mulDiv = function (multiplier: BigNumberish, divisor: BigNumberish): BigNumber {
return BigNumber.from(divisor).gt(0) ? BigNumber.from(this).mul(multiplier).div(divisor) : Zero
}
Expand All @@ -27,15 +39,3 @@ String.prototype.toBigNumber = function (decimals: BigNumberish): BigNumber {
}
return BigNumber.from(0)
}

if (typeof window !== 'undefined' && process.env.NODE_ENV === 'development') {
const whyDidYouRender = require('@welldone-software/why-did-you-render')

// See https://github.com/welldone-software/why-did-you-render#options
whyDidYouRender(React, {
trackAllPureComponents: true,
trackHooks: true,
logOwnerReasons: true,
collapseGroups: true,
})
}
10 changes: 9 additions & 1 deletion src/components/Image/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,15 @@ const shimmer = (w, h) => `

const toBase64 = (str) => (typeof window === 'undefined' ? Buffer.from(str).toString('base64') : window.btoa(str))

const Image = ({ src, width = undefined, height = undefined, layout = undefined, loader = undefined, ...rest }) => {
const Image = ({
src,
width = undefined,
height = undefined,
layout = undefined,
loader = undefined,
style,
...rest
}) => {
const useBlur = parseInt(String(height), 10) >= 40 && parseInt(String(width), 10) >= 40
return (
<div style={{ width, height }} className="overflow-hidden rounded">
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function Modal({
padding = 5,
maxWidth = 420,
}: ModalProps) {
console.log({ maxHeight: `${maxHeight}vh` })
// console.log({ maxHeight: `${maxHeight}vh` })
return (
<>
<Transition appear show={isOpen} as={Fragment}>
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useTransactionDeadline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default function useTransactionDeadline(): BigNumber | undefined {
const ttl = useAppSelector((state) => state.user.userDeadline)

const blockTimestamp = useCurrentBlockTimestamp()
console.log({ ttl, blockTimestamp })
// console.log({ ttl, blockTimestamp })
return useMemo(() => {
if (blockTimestamp && ttl) return blockTimestamp.add(ttl)
return undefined
Expand Down
Loading

0 comments on commit c87313c

Please sign in to comment.