Skip to content

Commit

Permalink
chore: add type to payload
Browse files Browse the repository at this point in the history
  • Loading branch information
Cahllagerfeld committed Dec 14, 2023
1 parent abb8227 commit 56da879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ui/hooks/usePollingService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const usePollingService = ({
sortBy,
isExpended,
dispatchFun,
type,
paginatedValue,
}: {
pipelineId?: TId;
Expand All @@ -26,7 +27,7 @@ export const usePollingService = ({
isExpended?: any;
sortBy: string;
dispatchFun: Function;

type?: string;
paginatedValue: any;
filter: {
column: filterValue;
Expand All @@ -40,7 +41,6 @@ export const usePollingService = ({

const isValidFilter = filter?.map((f) => f.value).join('');
const [pending, setPending] = useState(false);
console.log(stackComponentId, 'dispatchFun');
useEffect(() => {
if (!isValidFilter && !isExpended && !pending) {
const intervalId = setInterval(() => {
Expand All @@ -52,6 +52,7 @@ export const usePollingService = ({
stackId: stackId,
component_id: stackComponentId,
sort_by: sortBy,
type,
logical_operator: 'and',
workspace: selectedWorkspace,
page: paginatedValue.page,
Expand Down
1 change: 1 addition & 0 deletions src/ui/layouts/stackComponents/Stacks/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ export const List: React.FC<Props> = ({
usePollingService({
filter,
sortBy: activeSortingDirection?.toLowerCase() + ':' + activeSorting,
type: componentId,
dispatchFun: stackComponentsActions.getMy,
paginatedValue: stackComponentsPaginated,
});
Expand Down

0 comments on commit 56da879

Please sign in to comment.