Silence Logs

This commit is contained in:
Saahil dutta 2024-06-25 00:44:26 -04:00
parent e807810648
commit 5fa1ff371e
3 changed files with 5 additions and 5 deletions

View file

@ -46,7 +46,7 @@ getDeviceInfo() {
} }
handleWebVitals = () =>(d: any) => { handleWebVitals = () =>(d: any) => {
console.log(d) if(isDev) console.log(d)
let idThing = d.name let idThing = d.name
// const _this = this // const _this = this
switch(idThing) { switch(idThing) {

View file

@ -1,11 +1,11 @@
// writing my own hashRouter // writing my own hashRouter
export function HashRouter({ children }: any) { export function HashRouter({ children }: any) {
console.log(children) if(process.env.NODE_ENV !== "production") console.log(children)
if(!Array.isArray(children)) children = [children] if(!Array.isArray(children)) children = [children]
debugger; debugger;
const child = children.find((child:any) => { const child = children.find((child:any) => {
console.log('script', child.props, window.location.hash, child.props.route == window.location.hash, (window.location.hash.length < 2 && child.props.index)) if(process.env.NODE_ENV !== "production") console.log('script', child.props, window.location.hash, child.props.route == window.location.hash, (window.location.hash.length < 2 && child.props.index))
return child.props.path == window.location.hash || (window.location.hash.length < 2 && child.props.index) || child.props.path == "*" return child.props.path == window.location.hash || (window.location.hash.length < 2 && child.props.index) || child.props.path == "*"
}) })
// console.log('child', child) // console.log('child', child)

View file

@ -50,7 +50,7 @@ const [translateY, setTranslateY] = useState(0)
.then((data) => .then((data) =>
{ {
console.log(data[0], data[1]) if(process.env.NODE_ENV !== "production") console.log(data[0], data[1])
const idsThatAreFound:any = {} const idsThatAreFound:any = {}
const items = [...data[0], ...data[1]] const items = [...data[0], ...data[1]]
.filter(e => e.topics.includes('github-include-on-site')) .filter(e => e.topics.includes('github-include-on-site'))
@ -61,7 +61,7 @@ const [translateY, setTranslateY] = useState(0)
}) })
console.log() console.log()
console.log(items) if(process.env.NODE_ENV !== "production") console.log(items)
//@ts-ignore //@ts-ignore
setGithubData(items) setGithubData(items)
}) })