Skip to content

Commit 912af02

Browse files
committed
fix: resolve all lint errors
1 parent 253ef59 commit 912af02

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

components/ai-elements/web-preview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,15 @@ export const WebPreviewConsole = ({
238238
{logs.length === 0 ? (
239239
<p className="text-muted-foreground">No console output</p>
240240
) : (
241-
logs.map((log, index) => (
241+
logs.map((log) => (
242242
<div
243243
className={cn(
244244
"text-xs",
245245
log.level === "error" && "text-destructive",
246246
log.level === "warn" && "text-yellow-600",
247247
log.level === "log" && "text-foreground"
248248
)}
249-
key={`${log.timestamp.getTime()}-${index}`}
249+
key={`${log.timestamp.getTime()}-${log.message}`}
250250
>
251251
<span className="text-muted-foreground">
252252
{log.timestamp.toLocaleTimeString()}

components/console.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ export function Console({ consoleOutputs, setConsoleOutputs }: ConsoleProps) {
162162
</div>
163163
) : (
164164
<div className="flex w-full flex-col gap-2 overflow-x-scroll text-zinc-900 dark:text-zinc-50">
165-
{consoleOutput.contents.map((content, contentIndex) =>
165+
{consoleOutput.contents.map((content) =>
166166
content.type === "image" ? (
167-
<picture key={`${consoleOutput.id}-${contentIndex}`}>
167+
<picture key={`${consoleOutput.id}-${content.value}`}>
168168
<img
169169
alt="output"
170170
className="w-full max-w-(--breakpoint-toast-mobile) rounded-md"
@@ -174,7 +174,7 @@ export function Console({ consoleOutputs, setConsoleOutputs }: ConsoleProps) {
174174
) : (
175175
<div
176176
className="w-full whitespace-pre-line break-words"
177-
key={`${consoleOutput.id}-${contentIndex}`}
177+
key={`${consoleOutput.id}-${content.value}`}
178178
>
179179
{content.value}
180180
</div>

components/elements/web-preview.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,15 +227,15 @@ export const WebPreviewConsole = ({
227227
{logs.length === 0 ? (
228228
<p className="text-muted-foreground">No console output</p>
229229
) : (
230-
logs.map((log, index) => (
230+
logs.map((log) => (
231231
<div
232232
className={cn(
233233
"text-xs",
234234
log.level === "error" && "text-destructive",
235235
log.level === "warn" && "text-yellow-600",
236236
log.level === "log" && "text-foreground"
237237
)}
238-
key={`${log.timestamp.getTime()}-${index}`}
238+
key={`${log.timestamp.getTime()}-${log.message}`}
239239
>
240240
<span className="text-muted-foreground">
241241
{log.timestamp.toLocaleTimeString()}

next.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import type { NextConfig } from "next";
21
import { withBotId } from "botid/next/config";
2+
import type { NextConfig } from "next";
33

44
const nextConfig: NextConfig = {
55
cacheComponents: true,

0 commit comments

Comments
 (0)