serverProfile: fix crash with lurked guilds
Co-authored-by: aamiaa <9750071+aamiaa@users.noreply.github.com>
This commit is contained in:
parent
ac1b67ccbd
commit
c33d59b45d
@ -170,7 +170,7 @@ function ServerInfoTab({ guild }: GuildProps) {
|
||||
const Fields = {
|
||||
"Server Owner": owner ? Owner(guild.id, owner) : "Loading...",
|
||||
"Created At": renderTimestamp(SnowflakeUtils.extractTimestamp(guild.id)),
|
||||
"Joined At": renderTimestamp(guild.joinedAt.getTime()),
|
||||
"Joined At": guild.joinedAt ? renderTimestamp(guild.joinedAt.getTime()) : "-", // Not available in lurked guild
|
||||
"Vanity Link": guild.vanityURLCode ? (<a>{`discord.gg/${guild.vanityURLCode}`}</a>) : "-", // Making the anchor href valid would cause Discord to reload
|
||||
"Preferred Locale": guild.preferredLocale || "-",
|
||||
"Verification Level": ["None", "Low", "Medium", "High", "Highest"][guild.verificationLevel] || "?",
|
||||
|
@ -18,7 +18,7 @@ const Patch: NavContextMenuPatchCallback = (children, { guild }: { guild: Guild;
|
||||
group?.push(
|
||||
<Menu.MenuItem
|
||||
id="vc-server-profile"
|
||||
label="Server Profile"
|
||||
label="Server Info"
|
||||
action={() => openGuildProfileModal(guild)}
|
||||
/>
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user