moved input to the top and output to the bottom, and removed the error message showing on a blank input(?)

This commit is contained in:
n 2025-05-03 04:03:20 +01:00
parent 7452a62c72
commit 0f0d2a520d

View File

@ -83,7 +83,14 @@ function App() {
</CardDescription> </CardDescription>
</CardHeader> </CardHeader>
<CardContent> <CardContent>
{!isLoading && error && ( <Input
placeholder="Enter your email address or domain"
onChange={onChange}
value={input}
/>
</CardContent>
<CardFooter>
{input && !isLoading && error && (
<Alert variant="destructive"> <Alert variant="destructive">
<AlertTitle>Error!</AlertTitle> <AlertTitle>Error!</AlertTitle>
<AlertDescription>{error}</AlertDescription> <AlertDescription>{error}</AlertDescription>
@ -103,13 +110,6 @@ function App() {
</AlertDescription> </AlertDescription>
</Alert> </Alert>
)} )}
</CardContent>
<CardFooter>
<Input
placeholder="Enter your email address or domain"
onChange={onChange}
value={input}
/>
</CardFooter> </CardFooter>
</Card> </Card>
</div> </div>