Skip to content

An AI-powered search engine with a generative UI

Improve uploaded file component layout and rename to kebab-case

Yoshiki Miura1612fad2f863
diff --git a/components/chat-panel.tsx b/components/chat-panel.tsx
index 0eb2d5b7..80f43766 100644
--- a/components/chat-panel.tsx
+++ b/components/chat-panel.tsx
@@ -16,7 +16,7 @@ import { ModelSelector } from './model-selector'
import { SearchModeToggle } from './search-mode-toggle'
import { Button } from './ui/button'
import { IconLogo } from './ui/icons'
-import { UploadedFileList } from './uploaded-fileList'
+import { UploadedFileList } from './uploaded-file-list'
interface ChatPanelProps {
chatId: string
diff --git a/components/uploaded-fileList.tsx b/components/uploaded-file-list.tsx
similarity index 88%
rename from components/uploaded-fileList.tsx
rename to components/uploaded-file-list.tsx
index 6eca472a..19f124e6 100644
--- a/components/uploaded-fileList.tsx
+++ b/components/uploaded-file-list.tsx
@@ -15,14 +15,14 @@ export const UploadedFileList = React.memo(function UploadedFileList({
onRemove
}: UploadedFileListProps) {
return (
- <div className="w-full flex justify-center py-4">
+ <div className="w-full flex p-4 max-w-3xl mx-auto">
<div className="flex gap-6 overflow-x-auto">
{files.map((it, index) => (
<div
key={index}
- className="relative w-28 flex-shrink-0 flex flex-col items-center"
+ className="relative w-20 flex-shrink-0 flex flex-col items-center"
>
- <div className="relative w-28 h-20 rounded-lg overflow-hidden shadow border bg-muted/20 dark:bg-muted/10">
+ <div className="relative w-20 aspect-[7/5] rounded-lg overflow-hidden shadow border bg-muted/20 dark:bg-muted/10">
{it.file.type.startsWith('image/') ? (
<Image
src={URL.createObjectURL(it.file)}