mirror of
https://github.com/Equicord/Equicord.git
synced 2025-06-21 04:17:01 -04:00
Make Context Menu API support hooks (#902)
Co-authored-by: V <vendicated@riseup.net>
This commit is contained in:
parent
e8809fc57b
commit
96f640da67
10 changed files with 29 additions and 24 deletions
|
@ -81,7 +81,7 @@ function openImage(url: string) {
|
|||
));
|
||||
}
|
||||
|
||||
const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: UserContextProps) => {
|
||||
const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: UserContextProps) => () => {
|
||||
const memberAvatar = GuildMemberStore.getMember(guildId!, user.id)?.avatar || null;
|
||||
|
||||
children.splice(1, 0, (
|
||||
|
@ -106,7 +106,7 @@ const UserContext: NavContextMenuPatchCallback = (children, { user, guildId }: U
|
|||
));
|
||||
};
|
||||
|
||||
const GuildContext: NavContextMenuPatchCallback = (children, { guild: { id, icon, banner } }: GuildContextProps) => {
|
||||
const GuildContext: NavContextMenuPatchCallback = (children, { guild: { id, icon, banner } }: GuildContextProps) => () => {
|
||||
if (!banner && !icon) return;
|
||||
|
||||
// before copy id (if it exists)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue