Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
[UI > QuickInstall] Fix forum posts
Browse files Browse the repository at this point in the history
  • Loading branch information
redstonekasi authored and maisymoe committed Oct 20, 2023
1 parent d602f60 commit 289ffa4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/ui/quickInstall/forumPost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,7 @@ export default () => after("default", ForumPostLongPressActionSheet, ([{ thread
const url = urls[0];
if (!url) return;

/* Assuming that the actions array is at index 1
could break in the future, but I doubt Discord
will add more to the post action sheet and
index 0 will either be quick add reactions or false.
*/
const actions = findInReactTree(res, (t) => t.props?.bottom === true).props.children.props.children[1];
const actions = findInReactTree(res, (t) => t?.[0]?.key);
const ActionsSection = actions[0].type;

actions.unshift(<ActionsSection key="install">
Expand Down

0 comments on commit 289ffa4

Please sign in to comment.