From 03f1ab0c12fbbacd71547fab61b7b8ee3abb033d Mon Sep 17 00:00:00 2001
From: Manoj Vivek
Date: Thu, 14 May 2026 15:55:45 +0530
Subject: [PATCH] Cleanup the unused navigateTo props
---
.../src/ProfileExplorer/ProfileExplorerCompare.tsx | 9 +--------
.../src/ProfileExplorer/ProfileExplorerSingle.tsx | 8 +-------
.../shared/profile/src/ProfileExplorer/index.tsx | 13 ++++++-------
.../shared/profile/src/ProfileSelector/index.tsx | 4 +---
4 files changed, 9 insertions(+), 25 deletions(-)
diff --git a/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerCompare.tsx b/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerCompare.tsx
index e6e1956a130..02f88a80194 100644
--- a/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerCompare.tsx
+++ b/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerCompare.tsx
@@ -16,7 +16,6 @@ import {useCallback, useEffect, useMemo, useState} from 'react';
import {QueryServiceClient} from '@parca/client';
import {Query} from '@parca/parser';
import {TEST_IDS, testId} from '@parca/test-utils';
-import type {NavigateFunction} from '@parca/utilities';
import {ProfileDiffSource, ProfileViewWithData} from '..';
import ProfileSelector from '../ProfileSelector';
@@ -25,13 +24,9 @@ import {useQueryState} from '../hooks/useQueryState';
interface ProfileExplorerCompareProps {
queryClient: QueryServiceClient;
- navigateTo: NavigateFunction;
}
-const ProfileExplorerCompare = ({
- queryClient,
- navigateTo,
-}: ProfileExplorerCompareProps): JSX.Element => {
+const ProfileExplorerCompare = ({queryClient}: ProfileExplorerCompareProps): JSX.Element => {
const [showMetricsGraph, setShowMetricsGraph] = useState(true);
const {closeCompareMode, isCompareMode, isCompareAbsolute} = useCompareModeMeta();
@@ -107,7 +102,6 @@ const ProfileExplorerCompare = ({
closeProfile={closeProfileA}
enforcedProfileName={''}
comparing={true}
- navigateTo={navigateTo}
suffix="_a"
showMetricsGraph={showMetricsGraph}
setDisplayHideMetricsGraphButton={setShowMetricsGraph}
@@ -122,7 +116,6 @@ const ProfileExplorerCompare = ({
closeProfile={closeProfileB}
enforcedProfileName={enforcedProfileNameA}
comparing={true}
- navigateTo={navigateTo}
suffix="_b"
showMetricsGraph={showMetricsGraph}
setDisplayHideMetricsGraphButton={setShowMetricsGraph}
diff --git a/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerSingle.tsx b/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerSingle.tsx
index 31a7bc44271..6a50e2ecbd9 100644
--- a/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerSingle.tsx
+++ b/ui/packages/shared/profile/src/ProfileExplorer/ProfileExplorerSingle.tsx
@@ -14,7 +14,6 @@
import {useCallback, useState} from 'react';
import {QueryServiceClient} from '@parca/client';
-import type {NavigateFunction} from '@parca/utilities';
import {ProfileViewWithData} from '..';
import ProfileSelector from '../ProfileSelector';
@@ -22,13 +21,9 @@ import {useQueryState} from '../hooks/useQueryState';
interface ProfileExplorerSingleProps {
queryClient: QueryServiceClient;
- navigateTo: NavigateFunction;
}
-const ProfileExplorerSingle = ({
- queryClient,
- navigateTo,
-}: ProfileExplorerSingleProps): JSX.Element => {
+const ProfileExplorerSingle = ({queryClient}: ProfileExplorerSingleProps): JSX.Element => {
const [showMetricsGraph, setShowMetricsGraph] = useState(true);
const {profileSource, setDraftTimeRange, commitDraft} = useQueryState({suffix: '_a'});
@@ -47,7 +42,6 @@ const ProfileExplorerSingle = ({
closeProfile={() => {}} // eslint-disable-line @typescript-eslint/no-empty-function
comparing={false}
enforcedProfileName={''}
- navigateTo={navigateTo}
suffix="_a"
showMetricsGraph={showMetricsGraph}
setDisplayHideMetricsGraphButton={setShowMetricsGraph}
diff --git a/ui/packages/shared/profile/src/ProfileExplorer/index.tsx b/ui/packages/shared/profile/src/ProfileExplorer/index.tsx
index ca458106068..1852df87c68 100644
--- a/ui/packages/shared/profile/src/ProfileExplorer/index.tsx
+++ b/ui/packages/shared/profile/src/ProfileExplorer/index.tsx
@@ -18,7 +18,7 @@ import {Provider} from 'react-redux';
import {QueryServiceClient} from '@parca/client';
import {KeyDownProvider, useParcaContext} from '@parca/components';
import {createStore} from '@parca/store';
-import {capitalizeOnlyFirstLetter, type NavigateFunction} from '@parca/utilities';
+import {capitalizeOnlyFirstLetter} from '@parca/utilities';
import {useCompareModeMeta} from '../hooks/useCompareModeMeta';
import {useHasProfileData} from '../useHasProfileData';
@@ -27,7 +27,6 @@ import ProfileExplorerSingle from './ProfileExplorerSingle';
interface ProfileExplorerProps {
queryClient: QueryServiceClient;
- navigateTo: NavigateFunction;
}
const ErrorContent = ({errorMessage}: {errorMessage: string}): JSX.Element => {
@@ -41,7 +40,7 @@ const ErrorContent = ({errorMessage}: {errorMessage: string}): JSX.Element => {
);
};
-const ProfileExplorerApp = ({queryClient, navigateTo}: ProfileExplorerProps): JSX.Element => {
+const ProfileExplorerApp = ({queryClient}: ProfileExplorerProps): JSX.Element => {
const {
loading: hasProfileDataLoading,
data: hasProfileData,
@@ -77,13 +76,13 @@ const ProfileExplorerApp = ({queryClient, navigateTo}: ProfileExplorerProps): JS
}
if (isCompareMode) {
- return ;
+ return ;
}
- return ;
+ return ;
};
-const ProfileExplorer = ({queryClient, navigateTo}: ProfileExplorerProps): JSX.Element => {
+const ProfileExplorer = ({queryClient}: ProfileExplorerProps): JSX.Element => {
const {additionalFlamegraphColorProfiles} = useParcaContext();
const {store: reduxStore} = useMemo(() => {
@@ -93,7 +92,7 @@ const ProfileExplorer = ({queryClient, navigateTo}: ProfileExplorerProps): JSX.E
return (
-
+
);
diff --git a/ui/packages/shared/profile/src/ProfileSelector/index.tsx b/ui/packages/shared/profile/src/ProfileSelector/index.tsx
index 30fbf34b305..2cbf1658279 100644
--- a/ui/packages/shared/profile/src/ProfileSelector/index.tsx
+++ b/ui/packages/shared/profile/src/ProfileSelector/index.tsx
@@ -21,7 +21,7 @@ import {DateTimeRange, IconButton, useGrpcMetadata, useParcaContext} from '@parc
import {CloseIcon} from '@parca/icons';
import {Query} from '@parca/parser';
import {TEST_IDS, testId} from '@parca/test-utils';
-import {millisToProtoTimestamp, type NavigateFunction} from '@parca/utilities';
+import {millisToProtoTimestamp} from '@parca/utilities';
import {
ProfileFilter,
@@ -59,7 +59,6 @@ interface ProfileSelectorProps extends ProfileSelectorFeatures {
closeProfile: () => void;
enforcedProfileName: string;
comparing: boolean;
- navigateTo: NavigateFunction;
setDisplayHideMetricsGraphButton?: Dispatch>;
suffix?: '_a' | '_b'; // For comparison mode
onSearchHook?: () => void;
@@ -104,7 +103,6 @@ const ProfileSelector = ({
closeProfile,
enforcedProfileName,
comparing,
- navigateTo: _navigateTo,
showMetricsGraph = true,
showSumBySelector = true,
showProfileTypeSelector = true,