Common components refactor #1
2409
build/index.js
40
src/index.js
|
@ -1,14 +1,26 @@
|
||||||
// common
|
// common
|
||||||
import Lbry from 'lbry';
|
import Lbry from 'lbry';
|
||||||
import LbryApi from 'lbryapi';
|
|
||||||
import Lbryuri from 'lbryuri';
|
import Lbryuri from 'lbryuri';
|
||||||
export { Lbry, LbryApi, Lbryuri };
|
export { Lbry, Lbryuri };
|
||||||
|
|
||||||
// actions
|
// actions
|
||||||
|
export { doOpenModal, doCloseModal, doShowSnackBar } from 'redux/actions/app';
|
||||||
export { doFetchClaimListMine, doAbandonClaim, doResolveUris, doResolveUri } from 'redux/actions/claims';
|
export { doFetchClaimListMine, doAbandonClaim, doResolveUris, doResolveUri } from 'redux/actions/claims';
|
||||||
export { doFetchCostInfoForUri } from 'redux/actions/cost_info';
|
export { doFetchCostInfoForUri } from 'redux/actions/cost_info';
|
||||||
export { doFetchFileInfo, doFileList, doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info';
|
export { doFetchFileInfo, doFileList, doFetchFileInfosAndPublishedClaims } from 'redux/actions/file_info';
|
||||||
export { doSearch } from 'redux/actions/search';
|
export { doSearch } from 'redux/actions/search';
|
||||||
|
export {
|
||||||
|
doUpdateBalance,
|
||||||
|
doBalanceSubscribe,
|
||||||
|
doFetchTransactions,
|
||||||
|
doFetchBlock,
|
||||||
|
doGetNewAddress,
|
||||||
|
doCheckAddressIsMine,
|
||||||
|
doSendDraftTransaction,
|
||||||
|
doSetDraftTransactionAmount,
|
||||||
|
doSetDraftTransactionAddress,
|
||||||
|
doSendSupport
|
||||||
|
} from 'redux/actions/wallet';
|
||||||
|
|
||||||
// reducers
|
// reducers
|
||||||
export { claimsReducer } from 'redux/reducers/claims';
|
export { claimsReducer } from 'redux/reducers/claims';
|
||||||
|
@ -54,14 +66,14 @@ export {
|
||||||
} from 'redux/selectors/cost_info';
|
} from 'redux/selectors/cost_info';
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
makeSelectFileInfoForUri,
|
||||||
|
makeSelectDownloadingForUri,
|
||||||
|
makeSelectLoadingForUri,
|
||||||
selectFileInfosByOutpoint,
|
selectFileInfosByOutpoint,
|
||||||
selectIsFetchingFileList,
|
selectIsFetchingFileList,
|
||||||
selectIsFetchingFileListDownloadedOrPublished,
|
selectIsFetchingFileListDownloadedOrPublished,
|
||||||
makeSelectFileInfoForUri,
|
|
||||||
selectDownloadingByOutpoint,
|
selectDownloadingByOutpoint,
|
||||||
makeSelectDownloadingForUri,
|
|
||||||
selectUrisLoading,
|
selectUrisLoading,
|
||||||
makeSelectLoadingForUri,
|
|
||||||
selectFileInfosDownloaded,
|
selectFileInfosDownloaded,
|
||||||
selectDownloadingFileInfos,
|
selectDownloadingFileInfos,
|
||||||
selectTotalDownloadProgress
|
selectTotalDownloadProgress
|
||||||
|
@ -75,3 +87,21 @@ export {
|
||||||
selectWunderBarAddress,
|
selectWunderBarAddress,
|
||||||
selectWunderBarIcon
|
selectWunderBarIcon
|
||||||
} from 'redux/selectors/search';
|
} from 'redux/selectors/search';
|
||||||
|
|
||||||
|
export {
|
||||||
|
makeSelectBlockDate,
|
||||||
|
selectBalance,
|
||||||
|
selectTransactionsById,
|
||||||
|
selectTransactionItems,
|
||||||
|
selectRecentTransactions,
|
||||||
|
selectHasTransactions,
|
||||||
|
selectIsFetchingTransactions,
|
||||||
|
selectIsSendingSupport,
|
||||||
|
selectReceiveAddress,
|
||||||
|
selectGettingNewAddress,
|
||||||
|
selectDraftTransaction,
|
||||||
|
selectDraftTransactionAmount,
|
||||||
|
selectDraftTransactionAddress,
|
||||||
|
selectDraftTransactionError,
|
||||||
|
selectBlocks
|
||||||
|
} from 'redux/selectors/wallet';
|
||||||
|
|
24
src/redux/actions/app.js
Normal file
|
@ -0,0 +1,24 @@
|
||||||
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
import * as ACTIONS from 'constants/action_types';
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
export function doOpenModal(modal, modalProps = {}) {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
return {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
type: ACTIONS.OPEN_MODAL,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
data: {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
modal,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
modalProps,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
},
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
};
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
}
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
export function doCloseModal() {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
return {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
type: ACTIONS.CLOSE_MODAL,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
};
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
}
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
export function doShowSnackBar(data) {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
return {
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
type: ACTIONS.SHOW_SNACKBAR,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
data,
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
};
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
|||||||
|
}
|
||||||
All of these actions should probably be outside of All of these actions should probably be outside of `lbry-redux`, eh?
Did we decide on something like Did we decide on something like `DO_NOTIFY`?
|
All of these actions should probably be outside of
lbry-redux
, eh?