diff --git a/app/javascript/mastodon/features/compose/index.tsx b/app/javascript/mastodon/features/compose/index.tsx index eb44691997..8d9db22470 100644 --- a/app/javascript/mastodon/features/compose/index.tsx +++ b/app/javascript/mastodon/features/compose/index.tsx @@ -193,7 +193,11 @@ const Compose: React.FC<{ multiColumn: boolean }> = ({ multiColumn }) => { />
- +
diff --git a/app/javascript/mastodon/features/navigation_panel/index.tsx b/app/javascript/mastodon/features/navigation_panel/index.tsx index f573fbd82b..da5041ff4f 100644 --- a/app/javascript/mastodon/features/navigation_panel/index.tsx +++ b/app/javascript/mastodon/features/navigation_panel/index.tsx @@ -263,7 +263,7 @@ export const NavigationPanel: React.FC<{ multiColumn?: boolean }> = ({ {!multiColumn && (
  • boolean; text: string; - to?: string; + to?: MastodonLocationDescriptor; href?: string; method?: string; badge?: React.ReactNode; @@ -31,7 +32,9 @@ export const ColumnLink: React.FC<{ transparent, ...other }) => { - const match = useRouteMatch(to ?? ''); + const match = useRouteMatch( + (typeof to === 'string' ? to : to?.pathname) ?? '', + ); const className = classNames('column-link', { 'column-link--transparent': transparent, }); diff --git a/app/javascript/mastodon/features/ui/components/navigation_bar.tsx b/app/javascript/mastodon/features/ui/components/navigation_bar.tsx index c3f9373966..78a8d0bc95 100644 --- a/app/javascript/mastodon/features/ui/components/navigation_bar.tsx +++ b/app/javascript/mastodon/features/ui/components/navigation_bar.tsx @@ -17,6 +17,7 @@ import { toggleNavigation } from 'mastodon/actions/navigation'; import { fetchServer } from 'mastodon/actions/server'; import { Icon } from 'mastodon/components/icon'; import { IconWithBadge } from 'mastodon/components/icon_with_badge'; +import type { MastodonLocationDescriptor } from 'mastodon/components/router'; import { useIdentity } from 'mastodon/identity_context'; import { registrationsOpen, sso_redirect } from 'mastodon/initial_state'; import { selectUnreadNotificationGroupsCount } from 'mastodon/selectors/notifications'; @@ -38,12 +39,14 @@ export const messages = defineMessages({ }); const IconLabelButton: React.FC<{ - to: string; + to: MastodonLocationDescriptor; icon?: React.ReactNode; activeIcon?: React.ReactNode; title: string; }> = ({ to, icon, activeIcon, title }) => { - const match = useRouteMatch(to); + const match = useRouteMatch( + typeof to === 'string' ? to : (to.pathname ?? ''), + ); return ( { /> } />