mirror of
https://github.com/cinnyapp/cinny.git
synced 2025-02-23 21:53:05 +01:00
fix message search loading
This commit is contained in:
parent
ae4b6a49d4
commit
a1c9c3ef2e
1 changed files with 20 additions and 18 deletions
|
@ -241,7 +241,7 @@ export function MessageSearch({
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{msgSearchParams.term && vItems.length === 0 && status === 'success' && (
|
{msgSearchParams.term && groups.length === 0 && status === 'success' && (
|
||||||
<Box
|
<Box
|
||||||
className={ContainerColor({ variant: 'Warning' })}
|
className={ContainerColor({ variant: 'Warning' })}
|
||||||
style={{ padding: config.space.S300, borderRadius: config.radii.R400 }}
|
style={{ padding: config.space.S300, borderRadius: config.radii.R400 }}
|
||||||
|
@ -255,18 +255,12 @@ export function MessageSearch({
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{error && (
|
{((msgSearchParams.term && status === 'pending') ||
|
||||||
<Box
|
(groups.length > 0 && vItems.length === 0)) && (
|
||||||
className={ContainerColor({ variant: 'Critical' })}
|
<Box direction="Column" gap="100">
|
||||||
style={{
|
{[...Array(8).keys()].map((key) => (
|
||||||
padding: config.space.S300,
|
<SequenceCard variant="SurfaceVariant" key={key} style={{ minHeight: toRem(80) }} />
|
||||||
borderRadius: config.radii.R400,
|
))}
|
||||||
}}
|
|
||||||
direction="Column"
|
|
||||||
gap="200"
|
|
||||||
>
|
|
||||||
<Text size="L400">{error.name}</Text>
|
|
||||||
<Text size="T300">{error.message}</Text>
|
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -322,11 +316,19 @@ export function MessageSearch({
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
{msgSearchParams.term && status === 'pending' && (
|
|
||||||
<Box direction="Column" gap="100">
|
{error && (
|
||||||
{[...Array(8).keys()].map((key) => (
|
<Box
|
||||||
<SequenceCard variant="SurfaceVariant" key={key} style={{ minHeight: toRem(80) }} />
|
className={ContainerColor({ variant: 'Critical' })}
|
||||||
))}
|
style={{
|
||||||
|
padding: config.space.S300,
|
||||||
|
borderRadius: config.radii.R400,
|
||||||
|
}}
|
||||||
|
direction="Column"
|
||||||
|
gap="200"
|
||||||
|
>
|
||||||
|
<Text size="L400">{error.name}</Text>
|
||||||
|
<Text size="T300">{error.message}</Text>
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
Loading…
Reference in a new issue