From 244a31022e956af50cb83be46bb73892c99bffd1 Mon Sep 17 00:00:00 2001 From: Joe Karow <58997957+JoeKarow@users.noreply.github.com> Date: Fri, 28 Jul 2023 13:58:19 -0400 Subject: [PATCH] remove console.log --- apps/app/src/middleware.ts | 4 ---- apps/app/src/pages/org/[slug]/index.tsx | 1 - apps/app/src/pages/search/[...params]/index.tsx | 1 - apps/app/src/pages/search/intl/[country].tsx | 1 - packages/ui/components/core/MobileNav.tsx | 1 - packages/ui/components/core/SearchBox.tsx | 1 - packages/ui/components/core/UserReviewSubmit.tsx | 2 +- packages/ui/modals/UserSurvey/index.tsx | 2 +- 8 files changed, 2 insertions(+), 11 deletions(-) diff --git a/apps/app/src/middleware.ts b/apps/app/src/middleware.ts index 60fe7cd2ac..1ae9a2438b 100644 --- a/apps/app/src/middleware.ts +++ b/apps/app/src/middleware.ts @@ -5,7 +5,6 @@ export const middleware: NextMiddleware = async (req: NextRequest) => { const res = NextResponse.next() if (!req.cookies.has('inreach-session')) { - console.log('setting session') res.cookies.set({ name: 'inreach-session', value: crypto.randomUUID(), @@ -15,13 +14,10 @@ export const middleware: NextMiddleware = async (req: NextRequest) => { } const session = req.cookies.get('inreach-session') ?? res.cookies.get('inreach-session') - console.log('middleware pathname:', req.nextUrl.pathname) - if (req.nextUrl.pathname.startsWith('/search') && !req.nextUrl.pathname.startsWith('/search/intl')) { const activeCountries = await get('activeCountries') const searchedCountry = req.nextUrl.pathname.split('/').at(2) if (searchedCountry && !activeCountries?.includes(searchedCountry)) { - console.log('inactive country', searchedCountry) const url = req.nextUrl.clone() url.searchParams.forEach((_v, k) => url.searchParams.delete(k)) url.pathname = `/search/intl/${searchedCountry}` diff --git a/apps/app/src/pages/org/[slug]/index.tsx b/apps/app/src/pages/org/[slug]/index.tsx index 77a4d0de5e..1ed395b6ee 100644 --- a/apps/app/src/pages/org/[slug]/index.tsx +++ b/apps/app/src/pages/org/[slug]/index.tsx @@ -83,7 +83,6 @@ const OrganizationPage = ({ slug }: InferGetStaticPropsType(null) const reviewsRef = useRef(null) - console.log('fallback?', router.isFallback) useEffect(() => { if (data && status === 'success') { setLoading(false) diff --git a/apps/app/src/pages/search/[...params]/index.tsx b/apps/app/src/pages/search/[...params]/index.tsx index e44b90267b..e9c4ea3973 100644 --- a/apps/app/src/pages/search/[...params]/index.tsx +++ b/apps/app/src/pages/search/[...params]/index.tsx @@ -90,7 +90,6 @@ const SearchResults = () => { useEffect(() => { if (loadingPage !== searchIsLoading) { - console.log('setLoading', searchIsLoading) setLoadingPage(searchIsLoading) } if (searchQuery.data) { diff --git a/apps/app/src/pages/search/intl/[country].tsx b/apps/app/src/pages/search/intl/[country].tsx index c58151844d..1f1077cef8 100644 --- a/apps/app/src/pages/search/intl/[country].tsx +++ b/apps/app/src/pages/search/intl/[country].tsx @@ -296,7 +296,6 @@ export const getStaticProps = async ({ locale, }: GetStaticPropsContext>) => { const parsedQuery = QuerySchema.safeParse(params) - console.log(parsedQuery) if (!parsedQuery.success) { return { notFound: true, diff --git a/packages/ui/components/core/MobileNav.tsx b/packages/ui/components/core/MobileNav.tsx index ec5ab3e372..25819c0b66 100644 --- a/packages/ui/components/core/MobileNav.tsx +++ b/packages/ui/components/core/MobileNav.tsx @@ -97,7 +97,6 @@ export const MobileNav = ({ className }: { className?: string }) => { router.push('/support') break default: - console.log(tab) } }} > diff --git a/packages/ui/components/core/SearchBox.tsx b/packages/ui/components/core/SearchBox.tsx index 4ddb838bac..1be9d4f982 100644 --- a/packages/ui/components/core/SearchBox.tsx +++ b/packages/ui/components/core/SearchBox.tsx @@ -199,7 +199,6 @@ export const SearchBox = ({ DEFAULT_RADIUS, DEFAULT_UNIT, ]) - console.log('searchbox push', params) if (!params.success) return router.push({ pathname: '/search/[...params]', diff --git a/packages/ui/components/core/UserReviewSubmit.tsx b/packages/ui/components/core/UserReviewSubmit.tsx index f94640fe5b..d3abec3d3f 100644 --- a/packages/ui/components/core/UserReviewSubmit.tsx +++ b/packages/ui/components/core/UserReviewSubmit.tsx @@ -55,7 +55,7 @@ export const UserReviewSubmit = ({ type = 'body' }: ReviewSubmitProps) => {
{ submitReview.mutate(values) - }, console.log)} + })} > diff --git a/packages/ui/modals/UserSurvey/index.tsx b/packages/ui/modals/UserSurvey/index.tsx index b7d987eddf..961a89ba32 100644 --- a/packages/ui/modals/UserSurvey/index.tsx +++ b/packages/ui/modals/UserSurvey/index.tsx @@ -43,7 +43,7 @@ export const UserSurveyModalBody = forwardRef { //add something here - refer to AccountVerified error body - console.log(error) + console.error(error) }, })