Skip to content

Commit

Permalink
move approved and batch proposals hooks to hooks/api
Browse files Browse the repository at this point in the history
  • Loading branch information
victorgcramos committed Jul 8, 2020
1 parent 458fbbc commit 746c501
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/components/InvoiceDatasheet/wrappers.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import LazySelector from "./components/LazySelector";
import { getProposalsOptions } from "./helpers";
import { isEmpty } from "src/helpers";
import { Spinner } from "pi-ui";
import { useApprovedProposals } from "src/containers/Proposal/hooks";
import useApprovedProposals from "src/hooks/api/useApprovedProposals";
import drop from "lodash/drop";
import take from "lodash/take";

Expand Down
2 changes: 1 addition & 1 deletion src/components/ModalDiff/ModalDiffInvoice.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import styles from "./ModalDiff.module.css";
import { presentationalInvoiceName } from "src/containers/Invoice/helpers";
import uniq from "lodash/uniq";
import isEmpty from "lodash/isEmpty";
import { useApprovedProposals } from "src/containers/Proposal/hooks";
import useApprovedProposals from "src/hooks/api/useApprovedProposals";

const ModalDiffInvoice = ({ onClose, invoice, prevInvoice, ...props }) => {
const prevLineItems =
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Invoice/Detail/Detail.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { AdminInvoiceActionsProvider } from "src/containers/Invoice/Actions";
import Comments from "src/containers/Comments";
import { isUnreviewedInvoice } from "../helpers";
import { GoBackLink } from "src/components/Router";
import { useApprovedProposals } from "src/containers/Proposal/hooks";
import useApprovedProposals from "src/hooks/api/useApprovedProposals";
import isEmpty from "lodash/isEmpty";
import flow from "lodash/fp/flow";
import map from "lodash/fp/map";
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Invoice/Edit/Edit.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import get from "lodash/fp/get";
import { withRouter } from "react-router-dom";
import { Card } from "pi-ui";
import { useInvoice } from "../Detail/hooks";
import { useApprovedProposals } from "src/containers/Proposal/hooks";
import useApprovedProposals from "src/hooks/api/useApprovedProposals";
import { useEditInvoice } from "./hooks";
import { fromUSDCentsToUSDUnits } from "src/helpers";
import InvoiceLoader from "src/components/Invoice/InvoiceLoader";
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Invoice/New/New.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Card } from "pi-ui";
import InvoiceForm from "src/components/InvoiceForm";
import { useNewInvoice } from "./hooks";
import { useApprovedProposals } from "src/containers/Proposal/hooks";
import useApprovedProposals from "src/hooks/api/useApprovedProposals";

const NewInvoice = () => {
const { onSubmitInvoice } = useNewInvoice();
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Proposal/Public/Public.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useCallback, useMemo } from "react";
import { Spinner } from "pi-ui";
import styles from "./PublicProposals.module.css";
import { tabValues, mapProposalsTokensByTab } from "./helpers";
import { useProposalsBatch } from "../hooks";
import useProposalsBatch from "src/hooks/api/useProposalsBatch";
import Proposal from "src/components/Proposal";
import ProposalLoader from "src/components/Proposal/ProposalLoader";
import { PublicActionsProvider } from "src/containers/Proposal/Actions";
Expand Down
2 changes: 1 addition & 1 deletion src/containers/Proposal/Unvetted/Unvetted.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useCallback } from "react";
import { useProposalsBatch } from "../hooks";
import useProposalsBatch from "src/hooks/api/useProposalsBatch";
import Proposal from "src/components/Proposal";
import ProposalLoader from "src/components/Proposal/ProposalLoader";
import { tabValues, mapProposalsTokensByTab } from "./helpers";
Expand Down
2 changes: 0 additions & 2 deletions src/containers/Proposal/hooks/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
export { default as useProposalVote } from "./useProposalVote";
export { default as useProposalsBatch } from "./useProposalsBatch";
export { default as useProposalURLs } from "./useProposalURLs";
export { default as useProposalVoteTimeInfo } from "./useProposalVoteTimeInfo";
export { default as useApprovedProposals } from "./useApprovedProposals";
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useMemo } from "react";
import useAPIAction from "src/hooks/utils/useAPIAction";
import { useProposalsBatch } from "src/containers/Proposal/hooks";
import useProposalsBatch from "src/hooks/api/useProposalsBatch";
import { isEmpty } from "src/helpers";

export default function useApprovedProposals() {
Expand Down
File renamed without changes.

0 comments on commit 746c501

Please sign in to comment.