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]);
if (typeof invite === "undefined") {
return <EmbedInviteBase>
{error ? (
<Overline type="error" error={error} />
) : (
<Preloader type="ring" />
)}
return error ? (
<EmbedInviteBase>
<ServerIcon
size={55}
/>
<EmbedInviteDetails>
<EmbedInviteName>
Invalid invite!
</EmbedInviteName>
</EmbedInviteDetails>
</EmbedInviteBase>
) : (
<EmbedInviteBase>
<Preloader type="ring" />
</EmbedInviteBase>
)
}
return <EmbedInviteBase>