Skip to content

Commit

Permalink
fix: call noOp request on update view action
Browse files Browse the repository at this point in the history
Revert noop replacement made with a7554b5

refs: SHELL-55 (#234)
  • Loading branch information
beawar authored Apr 7, 2023
1 parent 742f52a commit b698224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/network/fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { IS_STANDALONE, SHELL_APP_ID } from '../constants';
import { useNetworkStore } from '../store/network';
import { handleSync } from '../store/network/utils';

export const noOp = (): void => {
export const fetchNoOp = (): void => {
// eslint-disable-next-line @typescript-eslint/no-use-before-define
getSoapFetch(SHELL_APP_ID)(
'NoOp',
Expand Down Expand Up @@ -130,7 +130,7 @@ const handleResponse = <R>(api: string, res: SoapResponse<R>): R | ErrorSoapBody
? 10000
: pollingInterval;
useNetworkStore.setState({
noOpTimeout: setTimeout(() => noOp(), nextPollingInterval),
noOpTimeout: setTimeout(() => fetchNoOp(), nextPollingInterval),
pollingInterval: nextPollingInterval,
seq,
..._context
Expand Down
3 changes: 2 additions & 1 deletion src/utility-bar/bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { getT } from '../store/i18n';
import { useUtilityBarStore } from './store';
import { useUtilityViews } from './utils';
import { SHELL_APP_ID } from '../constants';
import { fetchNoOp } from '../network/fetch';

const UtilityBarItem: FC<{ view: UtilityView }> = ({ view }) => {
const { mode, setMode, current, setCurrent } = useUtilityBarStore();
Expand Down Expand Up @@ -80,7 +81,7 @@ export const ShellUtilityBar = (): JSX.Element => {
{
id: 'update',
label: t('label.update_view', 'Update view'),
onClick: noop,
onClick: fetchNoOp,
icon: 'Refresh'
},
{
Expand Down

0 comments on commit b698224

Please sign in to comment.