diff options
3 files changed, 10 insertions, 4 deletions
diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx index 232a079143..513301fbd5 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/ProblemReport.tsx @@ -342,8 +342,8 @@ function OutdatedVersionWarningDialog() { const { location } = useHistory(); const { state } = location; - const hasSuppressOutdatedVersionWarning = state?.options?.includes( - 'suppress-outdated-version-warning', + const hasSuppressOutdatedVersionWarning = state?.options?.some( + (option) => option.type === 'suppress-outdated-version-warning', ); const showOutdatedVersionWarningInitial = outdatedVersion && !hasSuppressOutdatedVersionWarning; diff --git a/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/report-problem-button/ReportProblemButton.tsx b/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/report-problem-button/ReportProblemButton.tsx index 165509865c..eb4ee505ea 100644 --- a/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/report-problem-button/ReportProblemButton.tsx +++ b/desktop/packages/mullvad-vpn/src/renderer/components/views/app-upgrade/components/report-problem-button/ReportProblemButton.tsx @@ -5,7 +5,7 @@ import { Button } from '../../../../../lib/components'; export function ReportProblemButton() { const pushProblemReport = usePushProblemReport({ state: { - options: ['suppress-outdated-version-warning'], + options: [{ type: 'suppress-outdated-version-warning' }], }, }); diff --git a/desktop/packages/mullvad-vpn/src/shared/ipc-types.ts b/desktop/packages/mullvad-vpn/src/shared/ipc-types.ts index 403ec6ab35..40a32e42fa 100644 --- a/desktop/packages/mullvad-vpn/src/shared/ipc-types.ts +++ b/desktop/packages/mullvad-vpn/src/shared/ipc-types.ts @@ -13,13 +13,19 @@ export interface IWindowShapeParameters { arrowPosition?: number; } +export type SuppressOutdatedVersionOption = { + type: 'suppress-outdated-version-warning'; +}; + +export type LocationStateOptions = SuppressOutdatedVersionOption; + export type IChangelog = Array<string>; export interface LocationState { scrollPosition: [number, number]; expandedSections: Record<string, boolean>; transition: TransitionType; - options?: Array<string>; + options?: LocationStateOptions[]; } export interface IHistoryObject { |
