import {useContextSection, useQueryTableList} from '@hooks';
import {context, pageContext, searchContext} from '../context';
import {containerScrapLogList} from '@apis';

export function useList() {
  const params = useContextSection(
    context,
    function([{id, startTime, endTime}]) {
      return {containerName: id, startTime, endTime};
    },
  );

  return useQueryTableList({
    queryFn: containerScrapLogList,
    params,
    pageContext,
    searchContext,
  });
}
