Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/use-url-state-custom' into use-u…
Browse files Browse the repository at this point in the history
…rl-state-custom
  • Loading branch information
manojVivek committed Jan 20, 2025
2 parents 3ddb393 + 524b6a0 commit d7d91c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ui/packages/shared/components/src/hooks/URLState/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ type ParamValueSetterCustom<T> = (val: T) => void;

export const useURLStateCustom = <T extends object>(
param: string,
{ parse, stringify, ..._options }: Options & OptionsCustom<T>
{parse, stringify, ..._options}: Options & OptionsCustom<T>
): [T, ParamValueSetterCustom<T>] => {
const [urlValue, setURLValue] = useURLState<string>(param, _options);

Expand All @@ -155,6 +155,6 @@ export const useURLStateCustom = <T extends object>(
);

return [val, setVal];
}
};

export default URLStateContext;
4 changes: 3 additions & 1 deletion ui/packages/shared/profile/src/MetricsGraphStrips/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,9 @@ export const MetricsGraphStrips = ({
width={width ?? 1468}
fill={color(labelStr) as string}
selectionBounds={
isEqual(cpu.labels, selectedTimeframe?.labels.labels) ? selectedTimeframe?.bounds : undefined
isEqual(cpu.labels, selectedTimeframe?.labels.labels)
? selectedTimeframe?.bounds
: undefined
}
setSelectionBounds={bounds => {
onSelectedTimeframe(cpu, bounds);
Expand Down

0 comments on commit d7d91c9

Please sign in to comment.