Skip to content

Commit

Permalink
remove console logs
Browse files Browse the repository at this point in the history
  • Loading branch information
saifullah-talukder committed Jun 25, 2024
1 parent 24a4a7b commit 0bc64bf
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
5 changes: 1 addition & 4 deletions frontend/src/app/api/search/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import { curieoFetch } from '@/actions/fetch'
import { NextRequest, NextResponse } from 'next/server'

export const GET = async (req: NextRequest) => {
console.log('here')
console.log('req', req)
const { searchParams } = new URL(req.url)
const searchQuery = searchParams.get('searchQuery')
const threadId = searchParams.get('threadId')
Expand Down Expand Up @@ -41,11 +39,10 @@ export const GET = async (req: NextRequest) => {
const { readable, writable } = new TransformStream()
const writer = writable.getWriter()

pump(reader!, writer).catch(err => console.error('Streaming error:', err))
pump(reader!, writer).catch(err => err)

return new NextResponse(readable, { headers })
} catch (error) {
console.error('Error fetching data from external API:', error)
return NextResponse.json({ error: 'Internal server error' }, { status: 500 })
}
}
2 changes: 1 addition & 1 deletion frontend/src/components/auth/oauth-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import GoogleIcon from '@/components/icons/google'

export default function OAuthProviders() {
const handleContinueWithGoogle = () => {
console.log('CLICKED!')
//console.log('CLICKED!')
}
return (
<Button
Expand Down
3 changes: 0 additions & 3 deletions frontend/src/queries/search/search-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,11 @@ export const useSearchQuery = (
lines.forEach(line => {
if (line.startsWith('data: ')) {
const newData: SearchByIdResponse = JSON.parse(line.slice(6))
console.log(new Date().getTime() - timeNow.getTime())
//console.log(newData)
setData(prevData => [...prevData, newData])
}
})
}
} catch (error) {
console.error('Fetch stream error:', error)
setIsError(true)
setIsStreaming(false)
}
Expand Down

0 comments on commit 0bc64bf

Please sign in to comment.