Skip to content

Commit

Permalink
remove console.log
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeKarow committed Jul 28, 2023
1 parent 0931102 commit 244a310
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 11 deletions.
4 changes: 0 additions & 4 deletions apps/app/src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand All @@ -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<string[]>('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}`
Expand Down
1 change: 0 additions & 1 deletion apps/app/src/pages/org/[slug]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ const OrganizationPage = ({ slug }: InferGetStaticPropsType<typeof getStaticProp
const photosRef = useRef<HTMLDivElement>(null)
const reviewsRef = useRef<HTMLDivElement>(null)

console.log('fallback?', router.isFallback)
useEffect(() => {
if (data && status === 'success') {
setLoading(false)
Expand Down
1 change: 0 additions & 1 deletion apps/app/src/pages/search/[...params]/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const SearchResults = () => {

useEffect(() => {
if (loadingPage !== searchIsLoading) {
console.log('setLoading', searchIsLoading)
setLoadingPage(searchIsLoading)
}
if (searchQuery.data) {
Expand Down
1 change: 0 additions & 1 deletion apps/app/src/pages/search/intl/[country].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ export const getStaticProps = async ({
locale,
}: GetStaticPropsContext<RoutedQuery<'/search/intl/[country]'>>) => {
const parsedQuery = QuerySchema.safeParse(params)
console.log(parsedQuery)
if (!parsedQuery.success) {
return {
notFound: true,
Expand Down
1 change: 0 additions & 1 deletion packages/ui/components/core/MobileNav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ export const MobileNav = ({ className }: { className?: string }) => {
router.push('/support')
break
default:
console.log(tab)
}
}}
>
Expand Down
1 change: 0 additions & 1 deletion packages/ui/components/core/SearchBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]',
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/components/core/UserReviewSubmit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export const UserReviewSubmit = ({ type = 'body' }: ReviewSubmitProps) => {
<form
onSubmit={form.onSubmit((values) => {
submitReview.mutate(values)
}, console.log)}
})}
>
<Stack align='flex-start' spacing='xl'>
<UserAvatar useLoggedIn={true} avatarSize={48} />
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/modals/UserSurvey/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const UserSurveyModalBody = forwardRef<HTMLButtonElement, UserSurveyModal
},
onError: (error) => {
//add something here - refer to AccountVerified error body
console.log(error)
console.error(error)
},
})

Expand Down

0 comments on commit 244a310

Please sign in to comment.