Skip to content

An AI-powered search engine with a generative UI

Remove console.log and update type in SearchResults component

Yoshiki Miura0ba394cacd93
diff --git a/app/actions.tsx b/app/actions.tsx
index 0e9bca88..2e4dffc1 100644
--- a/app/actions.tsx
+++ b/app/actions.tsx
@@ -142,8 +142,6 @@ async function submit(formData?: FormData, skip?: boolean) {
toolOutputs = toolResponses
errorOccurred = hasError
- console.log('response: ' + fullResponse, 'error: ' + hasError)
-
if (toolOutputs.length > 0) {
toolOutputs.map(output => {
aiState.update({
diff --git a/components/search-results.tsx b/components/search-results.tsx
index 62c067e2..89de31cb 100644
--- a/components/search-results.tsx
+++ b/components/search-results.tsx
@@ -5,9 +5,10 @@ import { AvatarImage, Avatar, AvatarFallback } from '@/components/ui/avatar'
import { CardContent, Card } from '@/components/ui/card'
import { Button } from '@/components/ui/button'
import Link from 'next/link'
+import { SearchResultItem } from '@/lib/types'
export interface SearchResultsProps {
- results: { title: string; url: string; content: string; author?: string }[]
+ results: SearchResultItem[]
}
export function SearchResults({ results }: SearchResultsProps) {
@@ -37,7 +38,7 @@ export function SearchResults({ results }: SearchResultsProps) {
src={`https://www.google.com/s2/favicons?domain=${
new URL(result.url).hostname
}`}
- alt={result.author}
+ alt={new URL(result.url).hostname}
/>
<AvatarFallback>
{new URL(result.url).hostname[0]}