add proper placeholder for invalid invite

This commit is contained in:
TaiAurori 2021-08-31 21:22:19 +00:00 committed by GitHub
parent f9bb332605
commit a10e5100d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,13 +74,22 @@ export default function EmbedInvite(props: Props) {
}, [client, code, invite, status]); }, [client, code, invite, status]);
if (typeof invite === "undefined") { if (typeof invite === "undefined") {
return <EmbedInviteBase> return error ? (
{error ? ( <EmbedInviteBase>
<Overline type="error" error={error} /> <ServerIcon
) : ( size={55}
<Preloader type="ring" /> />
)} <EmbedInviteDetails>
<EmbedInviteName>
Invalid invite!
</EmbedInviteName>
</EmbedInviteDetails>
</EmbedInviteBase> </EmbedInviteBase>
) : (
<EmbedInviteBase>
<Preloader type="ring" />
</EmbedInviteBase>
)
} }
return <EmbedInviteBase> return <EmbedInviteBase>