Fix all biome linter errors (#541)

This commit is contained in:
Jared Palmer 2024-11-15 12:18:17 -05:00 committed by GitHub
parent f23c73f6a5
commit e5d654bf41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 317 additions and 275 deletions

View file

@ -1,13 +1,13 @@
'use client';
import { Message } from 'ai';
import type { Message } from 'ai';
import cx from 'classnames';
import { motion } from 'framer-motion';
import { Dispatch, SetStateAction } from 'react';
import type { Dispatch, SetStateAction } from 'react';
import { Vote } from '@/lib/db/schema';
import type { Vote } from '@/lib/db/schema';
import { UIBlock } from './block';
import type { UIBlock } from './block';
import { DocumentToolCall, DocumentToolResult } from './document';
import { SparklesIcon } from './icons';
import { Markdown } from './markdown';
@ -93,29 +93,28 @@ export const PreviewMessage = ({
)}
</div>
);
} else {
return (
<div
key={toolCallId}
className={cx({
skeleton: ['getWeather'].includes(toolName),
})}
>
{toolName === 'getWeather' ? (
<Weather />
) : toolName === 'createDocument' ? (
<DocumentToolCall type="create" args={args} />
) : toolName === 'updateDocument' ? (
<DocumentToolCall type="update" args={args} />
) : toolName === 'requestSuggestions' ? (
<DocumentToolCall
type="request-suggestions"
args={args}
/>
) : null}
</div>
);
}
return (
<div
key={toolCallId}
className={cx({
skeleton: ['getWeather'].includes(toolName),
})}
>
{toolName === 'getWeather' ? (
<Weather />
) : toolName === 'createDocument' ? (
<DocumentToolCall type="create" args={args} />
) : toolName === 'updateDocument' ? (
<DocumentToolCall type="update" args={args} />
) : toolName === 'requestSuggestions' ? (
<DocumentToolCall
type="request-suggestions"
args={args}
/>
) : null}
</div>
);
})}
</div>
)}