Skip to content

Commit

Permalink
unwrap list from hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
Strmiska committed Jul 13, 2021
1 parent dbc831d commit 2e2b833
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/tapis-app/src/Sections/Apps/Apps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const Apps: React.FC = () => {
const { resetSubmit } = useJobs();
const dispatch = useDispatch();
const [initialValues, setInitialValues] = useState<Jobs.ReqSubmitJob>(null);
const apps = useApps();
const { list } = useApps();
const appSelectCallback = useCallback<OnSelectCallback>(
(app: TapisApp) => {
dispatch(resetSubmit());
Expand All @@ -36,7 +36,7 @@ const Apps: React.FC = () => {
)
const refresh = () => {
setInitialValues(null);
dispatch(apps.list({}));
dispatch(list({}));
}

return (
Expand Down
4 changes: 2 additions & 2 deletions src/tapis-app/src/Sections/Jobs/Jobs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {

const Jobs: React.FC = () => {
const [job, setJob] = useState<JobListDTO>(null);
const jobs = useJobs();
const { list } = useJobs();
const dispatch = useDispatch();
const jobSelectCallback = useCallback<OnSelectCallback>(
(job: JobListDTO) => {
Expand All @@ -26,7 +26,7 @@ const Jobs: React.FC = () => {
)
const refresh = () => {
setJob(null);
dispatch(jobs.list({request: { orderBy: "created(desc)"}}));
dispatch(list({request: { orderBy: "created(desc)"}}));
}

return (
Expand Down
4 changes: 2 additions & 2 deletions src/tapis-app/src/Sections/Systems/Systems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ interface SystemsProps {

const Systems: React.FC<SystemsProps> = ({config}) => {
const [selectedSystem, setSelectedSystem] = useState<TapisSystem>(null);
const systems = useSystems();
const { list } = useSystems();
const dispatch = useDispatch();
const systemSelectCallback = useCallback(
(system: TapisSystem) => {
Expand All @@ -32,7 +32,7 @@ const Systems: React.FC<SystemsProps> = ({config}) => {
)
const refresh = () => {
setSelectedSystem(null);
dispatch(systems.list({}));
dispatch(list({}));
}

return (
Expand Down

0 comments on commit 2e2b833

Please sign in to comment.