feat: Improve UI for loading OpenAI models

Make the loading state of OpenAI models more visually appealing and user-friendly by replacing the default `Spin` component with a more contextually relevant loading animation within a centered container. This provides a better visual cue to users while models are being fetched.
This commit is contained in:
n4ze3m 2024-10-12 16:54:46 +05:30
parent ff371d6eef
commit acce9b97f6

View File

@ -77,7 +77,11 @@ export const OpenAIFetchModel = ({ openaiId, setOpenModelModal }: Props) => {
} }
if (status === "pending") { if (status === "pending") {
return <Spin /> return (
<div className="flex items-center justify-center h-40">
<Spin size="large" />
</div>
)
} }
if (status === "error" || !data || data.length === 0) { if (status === "error" || !data || data.length === 0) {
return ( return (