Skip to content

Commit

Permalink
Remove console logs in production (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
leowrites authored Dec 7, 2023
1 parent ecaca4a commit 25a72ba
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions P3/frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ const ShelterProtectedRoute = ({ children }) => {
}

function App() {
if (process.env.NODE_ENV === 'production') {
console.log = () => { };
console.warn = () => { };
console.error = () => { };
}
return (
<UserContextProvider>
<Router>
Expand Down

0 comments on commit 25a72ba

Please sign in to comment.