diff --git a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx index f1f70409817c4b..14ae94b88f5204 100644 --- a/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx +++ b/frontend/src/lib/components/Cards/InsightCard/InsightMeta.tsx @@ -140,7 +140,7 @@ export function InsightMeta({ moreButtons={ <> <> - + View {refresh && ( diff --git a/frontend/src/scenes/dashboard/DashboardEditBar.tsx b/frontend/src/scenes/dashboard/DashboardEditBar.tsx index 2fdf7c1c8767eb..63744a967d8e2b 100644 --- a/frontend/src/scenes/dashboard/DashboardEditBar.tsx +++ b/frontend/src/scenes/dashboard/DashboardEditBar.tsx @@ -1,4 +1,5 @@ import { IconCalendar } from '@posthog/icons' +import clsx from 'clsx' import { useActions, useValues } from 'kea' import { DateFilter } from 'lib/components/DateFilter/DateFilter' import { PropertyFilters } from 'lib/components/PropertyFilters/PropertyFilters' @@ -16,7 +17,14 @@ export function DashboardEditBar(): JSX.Element { const disabledReason = !canEditDashboard ? "You don't have permission to edit this dashboard" : undefined return ( -
+
([ '/dashboard/:id': () => { actions.setSubscriptionMode(false, undefined) actions.setTextTileId(null) - actions.setDashboardMode(null, DashboardEventSource.Browser) }, '/dashboard/:id/sharing': () => { actions.setSubscriptionMode(false, undefined) diff --git a/frontend/src/scenes/urls.ts b/frontend/src/scenes/urls.ts index 48d64a503f6786..77325a45b69720 100644 --- a/frontend/src/scenes/urls.ts +++ b/frontend/src/scenes/urls.ts @@ -91,7 +91,11 @@ export const urls = { ).url, insightEdit: (id: InsightShortId): string => `/insights/${id}/edit`, insightView: (id: InsightShortId, filtersOverride?: DashboardFilter): string => - `/insights/${id}${filtersOverride !== undefined ? `?filters_override=${JSON.stringify(filtersOverride)}` : ''}`, + `/insights/${id}${ + filtersOverride !== undefined + ? `?filters_override=${encodeURIComponent(JSON.stringify(filtersOverride))}` + : '' + }`, insightSubcriptions: (id: InsightShortId): string => `/insights/${id}/subscriptions`, insightSubcription: (id: InsightShortId, subscriptionId: string): string => `/insights/${id}/subscriptions/${subscriptionId}`,