diff --git a/app/soapbox/components/sidebar-navigation.tsx b/app/soapbox/components/sidebar-navigation.tsx index 6839ba8a3..39eea4ec4 100644 --- a/app/soapbox/components/sidebar-navigation.tsx +++ b/app/soapbox/components/sidebar-navigation.tsx @@ -57,9 +57,10 @@ const SidebarNavigation = () => { if (instance.invites_enabled) { menu.push({ - to: `${baseURL}/invites`, + href: `${baseURL}/invites`, icon: require('@tabler/icons/icons/mailbox.svg'), text: , + newTab: true, }); } diff --git a/app/soapbox/components/sidebar_menu.tsx b/app/soapbox/components/sidebar_menu.tsx index 2a0946e6e..15661c017 100644 --- a/app/soapbox/components/sidebar_menu.tsx +++ b/app/soapbox/components/sidebar_menu.tsx @@ -42,14 +42,15 @@ const messages = defineMessages({ }); interface ISidebarLink { - to: string, + href?: string, + to?: string, icon: string, text: string | JSX.Element, onClick: React.EventHandler, } -const SidebarLink: React.FC = ({ to, icon, text, onClick }) => ( - +const SidebarLink: React.FC = ({ href, to, icon, text, onClick }) => { + const body = (
@@ -57,8 +58,22 @@ const SidebarLink: React.FC = ({ to, icon, text, onClick }) => ( {text} - -); + ); + + if (to) { + return ( + + {body} + + ); + } + + return ( + + {body} + + ); +}; const getOtherAccounts = makeGetOtherAccounts(); @@ -228,7 +243,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { {instance.invites_enabled && (