Spaces:
Running
Running
File size: 944 Bytes
6b3405c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import { Card, Stack, Skeleton, Text } from "@mantine/core";
import { match } from "ts-pattern";
export default function PreparingContent({
textGenerationState,
}: {
textGenerationState: string;
}) {
return (
<Card withBorder shadow="sm" radius="md">
<Card.Section withBorder inheritPadding py="xs">
<Text fw={500}>
{match(textGenerationState)
.with("awaitingSearchResults", () => "Awaiting search results...")
.with("preparingToGenerate", () => "Preparing AI response...")
.otherwise(() => null)}
</Text>
</Card.Section>
<Card.Section withBorder inheritPadding py="md">
<Stack>
<Skeleton height={8} radius="xl" />
<Skeleton height={8} width="70%" radius="xl" />
<Skeleton height={8} radius="xl" />
<Skeleton height={8} width="43%" radius="xl" />
</Stack>
</Card.Section>
</Card>
);
}
|