An AI-powered search engine with a generative UI
TypeScript generative-aigenerative-uinextjsollamareactsearxngshadcn-uitailwindcsstavilytypescriptupstashvercel-ai-sdk
Improve uploaded file component layout and rename to kebab-case
Yoshiki Miura1612fad2f863
diff --git a/components/chat-panel.tsx b/components/chat-panel.tsxindex 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: stringdiff --git a/components/uploaded-fileList.tsx b/components/uploaded-file-list.tsxsimilarity index 88%rename from components/uploaded-fileList.tsxrename to components/uploaded-file-list.tsxindex 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) => (<divkey={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/') ? (<Imagesrc={URL.createObjectURL(it.file)}