From 5a23d75aa518bccbb692c7db7fd393d0c283ead0 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 9 May 2022 22:27:39 -0500 Subject: [PATCH] InstanceModerationPanel: convert to tsx --- .../components/instance_moderation_panel.js | Bin 2640 -> 0 bytes .../components/instance_moderation_panel.tsx | 65 ++++++++++++++++++ 2 files changed, 65 insertions(+) delete mode 100644 app/soapbox/features/ui/components/instance_moderation_panel.js create mode 100644 app/soapbox/features/ui/components/instance_moderation_panel.tsx diff --git a/app/soapbox/features/ui/components/instance_moderation_panel.js b/app/soapbox/features/ui/components/instance_moderation_panel.js deleted file mode 100644 index 2f18ba88728e0c1ec97a933997d12a4ac2e48cf9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2640 zcmaJ@U2p0*5Pj!Y%+n2(NO-5D>eaSg@zA>!+qcy!GRXkGo7k*v+OAOk`_4E{VxYZM zg>dHc9G{tx94&%%MwTwQolInN(8j@w(TCUn4rpO(bOXtO&Z*-EaHUBJCJ^H29mQeiW*+I&nPtq-F0kHgE!|eq!lX%GEQda4Qu) zqqSm(b_P${G{QNo!Xs#77^$S7I8~{YqFfhV2CL%-x%G6MKp#*&>q^vvr`6)H(I0an zM`~r~4O=4$9|(S>-_py=tUdKq!_8KC-R7 zozVXTKl}oqkzsn^p1`p9r_DM38K`4Tqt$($V5`l$Fx48j3vlL$M91WQoWV(13u~d* z3Qb86;fqjM1AaJE71{g6@Nzc$Cnkc)lO^!R=r&V6kmBmaxUn+5;mOaWUE{w;Nn_d} zXA)vJ*1p(MO zFr?2&>A0scAW<$z{{DKW$-RHom^nYD?d3mt;4}NSOG5Vc?*XVGsi7f^UBm3|h>-JX zqRH(h|%Hw_cze9=NA{d1XiYjlw~E~zz@L>(O{muyKQ>#+V2IIj=QI`BzGYe z;LGTAkAlENuH-Di=$dNCW|x4dU7qa38`eo&e=A@sQvV!=UP88_U=9TQ>4*eQwC;tOlY = ({ host }) => { + const intl = useIntl(); + const dispatch = useAppDispatch(); + + const account = useOwnAccount(); + const remoteInstance = useAppSelector(state => getRemoteInstance(state, host)); + + const handleEditFederation = () => { + dispatch(openModal('EDIT_FEDERATION', { host })); + }; + + const makeMenu = () => { + return [{ + text: intl.formatMessage(messages.editFederation), + action: handleEditFederation, + icon: require('@tabler/icons/icons/edit.svg'), + }]; + }; + + const menu = makeMenu(); + + return ( +
+
+ + + + + {account?.admin && ( +
+ +
+ )} +
+
+ +
+
+ ); +}; + +export default InstanceModerationPanel;